!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/   drwxr-xr-x
Free 13.42 GB of 57.97 GB (23.14%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     IsArray.php (3.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Hamcrest\Arrays;

/*
 Copyright (c) 2009 hamcrest.org
 */

// NOTE: This class is not exactly a direct port of Java's since Java handles
//       arrays quite differently than PHP

// TODO: Allow this to take matchers or values within the array
use Hamcrest\Description;
use 
Hamcrest\TypeSafeMatcher;
use 
Hamcrest\Util;

/**
 * Matcher for array whose elements satisfy a sequence of matchers.
 * The array size must equal the number of element matchers.
 */
class IsArray extends TypeSafeMatcher
{

    private 
$_elementMatchers;

    public function 
__construct(array $elementMatchers)
    {
        
parent::__construct(self::TYPE_ARRAY);

        
Util::checkAllAreMatchers($elementMatchers);

        
$this->_elementMatchers $elementMatchers;
    }

    protected function 
matchesSafely($array)
    {
        if (
array_keys($array) != array_keys($this->_elementMatchers)) {
            return 
false;
        }

        
/** @var $matcher \Hamcrest\Matcher */
        
foreach ($this->_elementMatchers as $k => $matcher) {
            if (!
$matcher->matches($array[$k])) {
                return 
false;
            }
        }

        return 
true;
    }

    protected function 
describeMismatchSafely($actualDescription $mismatchDescription)
    {
        if (
count($actual) != count($this->_elementMatchers)) {
            
$mismatchDescription->appendText('array length was ' count($actual));

            return;
        } elseif (
array_keys($actual) != array_keys($this->_elementMatchers)) {
            
$mismatchDescription->appendText('array keys were ')
                                                    ->
appendValueList(
                                                        
$this->descriptionStart(),
                                                        
$this->descriptionSeparator(),
                                                        
$this->descriptionEnd(),
                                                        
array_keys($actual)
                                                    )
                                                    ;

            return;
        }

        
/** @var $matcher \Hamcrest\Matcher */
        
foreach ($this->_elementMatchers as $k => $matcher) {
            if (!
$matcher->matches($actual[$k])) {
                
$mismatchDescription->appendText('element ')->appendValue($k)
                    ->
appendText(' was ')->appendValue($actual[$k]);

                return;
            }
        }
    }

    public function 
describeTo(Description $description)
    {
        
$description->appendList(
            
$this->descriptionStart(),
            
$this->descriptionSeparator(),
            
$this->descriptionEnd(),
            
$this->_elementMatchers
        
);
    }

    
/**
     * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
     *
     * @factory ...
     */
    
public static function anArray(/* args... */)
    {
        
$args func_get_args();

        return new 
self(Util::createMatcherArray($args));
    }

    
// -- Protected Methods

    
protected function descriptionStart()
    {
        return 
'[';
    }

    protected function 
descriptionSeparator()
    {
        return 
', ';
    }

    protected function 
descriptionEnd()
    {
        return 
']';
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0057 ]--