!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)

/usr/share/php/Symfony/Component/Cache/Traits/   drwxr-xr-x
Free 13.3 GB of 57.97 GB (22.95%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ArrayTrait.php (4.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Cache\Traits;

use 
Psr\Log\LoggerAwareTrait;
use 
Symfony\Component\Cache\CacheItem;

/**
 * @author Nicolas Grekas <p@tchwork.com>
 *
 * @internal
 */
trait ArrayTrait
{
    use 
LoggerAwareTrait;

    private 
$storeSerialized;
    private 
$values = [];
    private 
$expiries = [];

    
/**
     * Returns all cached values, with cache miss as null.
     *
     * @return array
     */
    
public function getValues()
    {
        if (!
$this->storeSerialized) {
            return 
$this->values;
        }

        
$values $this->values;
        foreach (
$values as $k => $v) {
            if (
null === $v || 'N;' === $v) {
                continue;
            }
            if (!
\is_string($v) || !isset($v[2]) || ':' !== $v[1]) {
                
$values[$k] = serialize($v);
            }
        }

        return 
$values;
    }

    
/**
     * {@inheritdoc}
     */
    
public function hasItem($key)
    {
        if (
\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) {
            return 
true;
        }
        
CacheItem::validateKey($key);

        return isset(
$this->expiries[$key]) && !$this->deleteItem($key);
    }

    
/**
     * {@inheritdoc}
     */
    
public function clear()
    {
        
$this->values $this->expiries = [];

        return 
true;
    }

    
/**
     * {@inheritdoc}
     */
    
public function deleteItem($key)
    {
        if (!
\is_string($key) || !isset($this->expiries[$key])) {
            
CacheItem::validateKey($key);
        }
        unset(
$this->values[$key], $this->expiries[$key]);

        return 
true;
    }

    
/**
     * {@inheritdoc}
     */
    
public function reset()
    {
        
$this->clear();
    }

    private function 
generateItems(array $keys$now$f)
    {
        foreach (
$keys as $i => $key) {
            if (!
$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] > $now || !$this->deleteItem($key))) {
                
$this->values[$key] = $value null;
            } else {
                
$value $this->storeSerialized $this->unfreeze($key$isHit) : $this->values[$key];
            }
            unset(
$keys[$i]);

            yield 
$key => $f($key$value$isHit);
        }

        foreach (
$keys as $key) {
            yield 
$key => $f($keynullfalse);
        }
    }

    private function 
freeze($value$key)
    {
        if (
null === $value) {
            return 
'N;';
        }
        if (
\is_string($value)) {
            
// Serialize strings if they could be confused with serialized objects or arrays
            
if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
                return 
serialize($value);
            }
        } elseif (!
is_scalar($value)) {
            try {
                
$serialized serialize($value);
            } catch (
\Exception $e) {
                
$type \is_object($value) ? \get_class($value) : \gettype($value);
                
$message sprintf('Failed to save key "{key}" of type %s: %s'$type$e->getMessage());
                
CacheItem::log($this->logger$message, ['key' => $key'exception' => $e]);

                return 
null;
            }
            
// Keep value serialized if it contains any objects or any internal references
            
if ('C' === $serialized[0] || 'O' === $serialized[0] || preg_match('/;[OCRr]:[1-9]/'$serialized)) {
                return 
$serialized;
            }
        }

        return 
$value;
    }

    private function 
unfreeze(string $keybool &$isHit)
    {
        if (
'N;' === $value $this->values[$key]) {
            return 
null;
        }
        if (
\is_string($value) && isset($value[2]) && ':' === $value[1]) {
            try {
                
$value unserialize($value);
            } catch (
\Exception $e) {
                
CacheItem::log($this->logger'Failed to unserialize key "{key}": '.$e->getMessage(), ['key' => $key'exception' => $e]);
                
$value false;
            }
            if (
false === $value) {
                
$this->values[$key] = $value null;
                
$isHit false;
            }
        }

        return 
$value;
    }
}

:: 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.0054 ]--