3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myvar = null; function set_myvar(){ $GLOBALS['myvar'] = eval("return 'Hello world';"); } set_myvar(); echo $myvar;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pJigY
function name:  (null)
number of ops:  5
compiled vars:  !0 = $myvar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    7     1        INIT_FCALL                                               'set_myvar'
          2        DO_FCALL                                      0          
    8     3        ECHO                                                     !0
    9     4      > RETURN                                                   1

Function set_myvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pJigY
function name:  set_myvar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INCLUDE_OR_EVAL                                  $1      'return+%27Hello+world%27%3B', EVAL
          1        FETCH_W                      global              $0      'myvar'
          2        ASSIGN                                                   $0, $1
    6     3      > RETURN                                                   null

End of function set_myvar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.12 ms | 1010 KiB | 14 Q