3v4l.org

run code in 300+ PHP versions simultaneously
<?php $global_var="leorem"; $global_p=&$global_var; function myfunc () { global $global_var; $global_var = "hello"; echo $global_var; } myfunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWjRB
function name:  (null)
number of ops:  5
compiled vars:  !0 = $global_var, !1 = $global_p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'leorem'
    3     1        ASSIGN_REF                                               !1, !0
   10     2        INIT_FCALL                                               'myfunc'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWjRB
function name:  myfunc
number of ops:  4
compiled vars:  !0 = $global_var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'global_var'
    7     1        ASSIGN                                                   !0, 'hello'
    8     2        ECHO                                                     !0
    9     3      > RETURN                                                   null

End of function myfunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.55 ms | 1396 KiB | 14 Q