3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new class { function __destruct() { $GLOBALS['a'] = eval('$c=`ls`;return $c. 0x1B;') . "[42m 2>&1" ; } }; $a = `2`; var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h3gie
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   12     4        INIT_FCALL                                               'shell_exec'
          5        SEND_VAL                                                 '2'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !0, $5
   13     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class class@anonymous:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h3gie
function name:  __destruct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INCLUDE_OR_EVAL                                  $2      '%24c%3D%60ls%60%3Breturn+%24c.+0x1B%3B', EVAL
          1        CONCAT                                           ~3      $2, '%5B42m+2%3E%261'
          2        FETCH_W                      global              $0      'GLOBALS'
          3        ASSIGN_DIM                                               $0, 'a'
          4        OP_DATA                                                  ~3
    8     5      > RETURN                                                   null

End of function __destruct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.5 ms | 1395 KiB | 17 Q