!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/sms.picotech.app/public_html/vendor/alexandr-mironov/php8-smpp/src/   drwxr-xr-x
Free 29.22 GB of 117.98 GB (24.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
smpp;

use 
ArrayIterator;
use 
IteratorIterator;
use 
smpp\exceptions\InvalidCollectionItem;

/**
 * Class Collection
 * @package smpp
 *
 * all item classes must implements ItemInterface
 */
class Collection extends IteratorIterator
{
    
/** @var class-string class name of items */
    
public const CLASSNAME ItemInterface::class;

    
/** @var ItemInterface[] */
    
public array $items = [];

    
/**
     * Collection constructor.
     *
     * @param bool $strict in strict mode on invalid collection item will be thrown an Exception
     * @param ItemInterface ...$items
     *
     * @throws InvalidCollectionItem
     */
    
public function __construct(
        public 
bool $strict false,
        
ItemInterface ...$items,
    )
    {
        
$this->addItems($items);
        
parent::__construct(new ArrayIterator($this->items));
    }

    
/**
     * Add item to collection
     *
     * @param ItemInterface $item
     *
     * @throws InvalidCollectionItem
     */
    
public function addItem(ItemInterface $item): void
    
{
        
/** @var class-string $classname */
        
$classname = static::CLASSNAME;
        if (
$item instanceof $classname) {
            
$this->items[] = $item;
        } else {
            if (
$this->strict) {
                throw new 
InvalidCollectionItem('Invalid item of collection');
            }
        }
    }

    
/**
     * @param ItemInterface[] $items
     * @throws InvalidCollectionItem
     */
    
public function addItems(array $items): void
    
{
        foreach (
$items as $item) {
            
$this->addItem($item);
        }
    }

    
/**
     * remove last element from collection
     */
    
public function pop(): void
    
{
        unset(
$this->items[$this->count() - 1]);
    }

    
/**
     * count items in collection
     * @return int
     */
    
public function count(): int
    
{
        return 
count($this->items);
    }

    
/**
     * cleanup collection (remove all elements)
     */
    
public function clear(): void
    
{
        
$this->items = [];
    }

    
/**
     * Shuffle items in collection
     * @return void
     */
    
public function shuffle(): void
    
{
        
shuffle($this->items);
    }

    
/**
     * @return string
     */
    
public function __toString(): string
    
{
        return 
serialize($this->items);
    }
}

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