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"; } myfunc(); echo $global_var;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eI8TX
function name:  (null)
number of ops:  6
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
    9     2        INIT_FCALL                                               'myfunc'
          3        DO_FCALL                                      0          
   10     4        ECHO                                                     !0
          5      > RETURN                                                   1

Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eI8TX
function name:  myfunc
number of ops:  3
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      > RETURN                                                   null

End of function myfunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.23 ms | 1396 KiB | 14 Q