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

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/home/scripts/pba/phc-read-only/test/subjects/parsing/   drwxrwxr-x
Free 83.33 GB of 96.73 GB (86.15%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     refs.php (3.44 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
    
/*
     * Test to confirm the semantics of the & operator in various contexts
     *
     * phc -- The PHP compiler
     */

    /*
     * assignment ::= variable '&'? expr
     */

    
$base 1;
    
$ref =& $base;

    
var_dump($base);        // int(1) 
    
var_dump($ref);        // int(1)

    
$ref 2;

    
var_dump($base);        // int(2)
    
var_dump($ref);        // int(2);

    /*
     * array_elem ::= expr? '&' expr
     */

    
$base_1 3;
    
$base_2 4;

    
$ref = array(=> &$base_1=> &$base_2);

    
var_dump($ref);        // [1]=>&int(3) [2]=>&int(4)

    
$base_1 5;
    
$base_2 6;

    
var_dump($ref);        // [1]=>&int(5)    [2]=>&int(6)
    
    
$ref[1] = 7;
    
$ref[2] = 8;

     
var_dump($ref);          // [1]=>&int(7) [2]=>&int(8)
    
var_dump($base_1);    // int(7)
    
var_dump($base_2);    // int(8)

    
$base_3 9;
    
$ref[2] =& $base_3;

    
var_dump($ref);        // [1]=>&int(7) [2]=>&int(9)

    /*
     * foreach ::= expr VARIABLE '&' VARIABLE statement*
     *
     * Note the difference in the structure after the second foreach
     * (I do not know whether this is something we need to mimick)
     */

    
$arr = array(=> 11=> 12);
    
var_dump($arr);        // [1]=> int(11) [2]=> int(12)

    
foreach($arr as $key => $val) { $key += 10$val *= 2; }
    
var_dump($arr);        // [1]=> int(11) [2]=> int(12)

    
foreach($arr as $key => &$val) { $key += 10$val *= 2; }
    
var_dump($arr);        // [1]=> &int(22) [2]=> &int(24)
    
    
foreach($arr as $key => &$val) { $key += 10$val *= 2; }
    
var_dump($arr);        // [1]=> &int(44) [2]=> &int(48)

    /*
     * formal_parameter ::= IDENT? '&'? VARIABLE static_scalar?
     *
     * Note that the global keyword overrides the & in function f3.
     */

    
$x 2;
    
    function 
f1($par)
    {
        
var_dump($par);
        
$par *= 2;
    }

    
f1($x);                    // int(2)
    
var_dump($x);            // int(2)

    
function f2(&$par)
    {
        
var_dump($par);
        
$par *= 2;
    }

    
f2($x);                    // int(2)
    
var_dump($x);            // int(4)

    
function f3(&$par)
    {
        global 
$par;
        
var_dump($par);
        
$par *= 2;
    }

    
f3($x);                    // NULL
    
var_dump($x);            // int(4)

    /*
     * signature ::= '&'? IDENT formal_parameter*
     *
     * Note the difference between the lines marked [*] and [**]
     */
    
    
function f4()
    {
        static 
$in_f4 0;

        
$in_f4++;
        return 
$in_f4;
    }

    
$out_f4 f4();
    
var_dump($out_f4);        // int(1)

    
$out_f4 f4();
    
var_dump($out_f4);        // int(2)

    
$out_f4 10;
    
var_dump($out_f4);        // int(10)
    
$out_f4 f4();
    
var_dump($out_f4);        // int(3)

    
$out_f4 =& f4();
    
var_dump($out_f4);        // int(4)
    
$out_f4 10;
    
var_dump($out_f4);        // int(10)
    
$out_f4 f4();
    
var_dump($out_f4);        // int(5) [*]
    
    
function &f5()
    {
        static 
$in_f5 0;

        
$in_f5++;
        return 
$in_f5;
    }

    
$out_f5 f5();
    
var_dump($out_f5);        // int(1)

    
$out_f5 f5();
    
var_dump($out_f5);        // int(2)

    
$out_f5 10;
    
var_dump($out_f5);        // int(10)
    
$out_f5 f5();
    
var_dump($out_f5);        // int(3)

    
$out_f5 =& f5();
    
var_dump($out_f5);        // int(4)
    
$out_f5 10;
    
var_dump($out_f5);        // int(10)
    
$out_f5 f5();
    
var_dump($out_f5);        // int(11) [**]

    /*
     * actual_paramter ::= '&' VARIABLE
     *
     * Note the discrepency between this and the previous test. 
     * - If a function _returns_ a symbol table entry, the associated assignment
     *   must also be =& (and not just =; cf. test above)
     * - For a function to _accept_ a symbol table entry, there is a choice:
     *   either you add the & to the formal parameter, or you add the & to the
     *   actual parameter (both is allowed too). 
     */
    
    
function h1($in_h1)
    {
        
$in_h1++;
    }

    
$out_h1 5;
    
h1(&$out_h1);
    
var_dump($out_h1);            // Outputs 6    
    
    
function h2(&$in_h2)
    {
        
$in_h2++;
    }

    
$out_h2 5;
    
h2(&$out_h2);
    
var_dump($out_h2);            // Outputs 6    
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0046 ]--