3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 2; function func(){ $var = 23; return(eval('global $a; return $a = ' . $var . ';')); } var_dump(func());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3YUeM
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2
   11     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'func'
          3        DO_FCALL                                      0  $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3YUeM
function name:  func
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 23
    8     1        CONCAT                                           ~2      'global+%24a%3B+return+%24a+%3D+', !0
          2        CONCAT                                           ~3      ~2, '%3B'
          3        INCLUDE_OR_EVAL                                  $4      ~3, EVAL
          4      > RETURN                                                   $4
    9     5*     > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.19 ms | 1397 KiB | 16 Q