!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/nesbot/carbon/src/Carbon/Traits/   drwxr-xr-x
Free 13.25 GB of 57.97 GB (22.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * This file is part of the Carbon package.
 *
 * (c) Brian Nesbitt <brian@nesbot.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Carbon\Traits;

use 
Carbon\Exceptions\InvalidFormatException;

/**
 * Trait Serialization.
 *
 * Serialization and JSON stuff.
 *
 * Depends on the following properties:
 *
 * @property int $year
 * @property int $month
 * @property int $daysInMonth
 * @property int $quarter
 *
 * Depends on the following methods:
 *
 * @method string|static locale(string $locale = null, string ...$fallbackLocales)
 * @method string        toJSON()
 */
trait Serialization
{
    use 
ObjectInitialisation;

    
/**
     * The custom Carbon JSON serializer.
     *
     * @var callable|null
     */
    
protected static $serializer;

    
/**
     * List of key to use for dump/serialization.
     *
     * @var string[]
     */
    
protected $dumpProperties = ['date''timezone_type''timezone'];

    
/**
     * Locale to dump comes here before serialization.
     *
     * @var string|null
     */
    
protected $dumpLocale null;

    
/**
     * Return a serialized string of the instance.
     *
     * @return string
     */
    
public function serialize()
    {
        return 
serialize($this);
    }

    
/**
     * Create an instance from a serialized string.
     *
     * @param string $value
     *
     * @throws InvalidFormatException
     *
     * @return static
     */
    
public static function fromSerialized($value)
    {
        
$instance = @unserialize("$value");

        if (!
$instance instanceof static) {
            throw new 
InvalidFormatException("Invalid serialized value: $value");
        }

        return 
$instance;
    }

    
/**
     * The __set_state handler.
     *
     * @param string|array $dump
     *
     * @return static
     */
    
public static function __set_state($dump)
    {
        if (
\is_string($dump)) {
            return static::
parse($dump);
        }

        
/** @var \DateTimeInterface $date */
        
$date get_parent_class(static::class) && method_exists(parent::class, '__set_state')
            ? 
parent::__set_state((array) $dump)
            : (object) 
$dump;

        return static::
instance($date);
    }

    
/**
     * Returns the list of properties to dump on serialize() called on.
     *
     * @return array
     */
    
public function __sleep()
    {
        
$properties $this->dumpProperties;

        if (
$this->localTranslator ?? null) {
            
$properties[] = 'dumpLocale';
            
$this->dumpLocale $this->locale ?? null;
        }

        return 
$properties;
    }

    
/**
     * Set locale if specified on unserialize() called.
     */
    
public function __wakeup()
    {
        if (
get_parent_class() && method_exists(parent::class, '__wakeup')) {
            
parent::__wakeup();
        }

        
$this->constructedObjectId spl_object_hash($this);

        if (isset(
$this->dumpLocale)) {
            
$this->locale($this->dumpLocale);
            
$this->dumpLocale null;
        }

        
$this->cleanupDumpProperties();
    }

    
/**
     * Prepare the object for JSON serialization.
     *
     * @return array|string
     */
    
public function jsonSerialize()
    {
        
$serializer $this->localSerializer ?? static::$serializer;

        if (
$serializer) {
            return 
\is_string($serializer)
                ? 
$this->rawFormat($serializer)
                : 
$serializer($this);
        }

        return 
$this->toJSON();
    }

    
/**
     * @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
     *             You should rather transform Carbon object before the serialization.
     *
     * JSON serialize all Carbon instances using the given callback.
     *
     * @param callable $callback
     *
     * @return void
     */
    
public static function serializeUsing($callback)
    {
        static::
$serializer $callback;
    }

    
/**
     * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested.
     * foreach ($date as $_) {}
     * serializer($date)
     * var_export($date)
     * get_object_vars($date)
     */
    
public function cleanupDumpProperties()
    {
        foreach (
$this->dumpProperties as $property) {
            if (isset(
$this->$property)) {
                unset(
$this->$property);
            }
        }

        return 
$this;
    }
}

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