!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/nikic/php-parser/test/PhpParser/   drwxr-xr-x
Free 116.86 GB of 200.55 GB (58.27%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

namespace PhpParser;

use 
PhpParser\Comment;

require_once 
__DIR__ '/CodeTestAbstract.php';

class 
CodeParsingTest extends CodeTestAbstract
{
    
/**
     * @dataProvider provideTestParse
     */
    
public function testParse($name$code$expected$mode) {
        
$lexer = new Lexer\Emulative(array('usedAttributes' => array(
            
'startLine''endLine''startFilePos''endFilePos''comments'
        
)));
        
$parser5 = new Parser\Php5($lexer, array(
            
'throwOnError' => false,
        ));
        
$parser7 = new Parser\Php7($lexer, array(
            
'throwOnError' => false,
        ));

        
$output5 $this->getParseOutput($parser5$code);
        
$output7 $this->getParseOutput($parser7$code);

        if (
$mode === 'php5') {
            
$this->assertSame($expected$output5$name);
            
$this->assertNotSame($expected$output7$name);
        } else if (
$mode === 'php7') {
            
$this->assertNotSame($expected$output5$name);
            
$this->assertSame($expected$output7$name);
        } else {
            
$this->assertSame($expected$output5$name);
            
$this->assertSame($expected$output7$name);
        }
    }

    private function 
getParseOutput(Parser $parser$code) {
        
$stmts $parser->parse($code);
        
$errors $parser->getErrors();

        
$output '';
        foreach (
$errors as $error) {
            
$output .= $this->formatErrorMessage($error$code) . "\n";
        }

        if (
null !== $stmts) {
            
$dumper = new NodeDumper(['dumpComments' => true]);
            
$output .= $dumper->dump($stmts);
        }

        return 
canonicalize($output);
    }

    public function 
provideTestParse() {
        return 
$this->getTests(__DIR__ '/../code/parser''test');
    }

    private function 
formatErrorMessage(Error $e$code) {
        if (
$e->hasColumnInfo()) {
            return 
$e->getRawMessage() . ' from ' $e->getStartLine() . ':' $e->getStartColumn($code)
                . 
' to ' $e->getEndLine() . ':' $e->getEndColumn($code);
        } else {
            return 
$e->getMessage();
        }
    }
}

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