3v4l.org

run code in 300+ PHP versions simultaneously
<?php $global_var="lorem"; $global_p=&$global_var; function myfunc () { global $global_p, $global_var; var_dump($global_p); var_dump($global_var); } myfunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RUa3I
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, 'lorem'
    3     1        ASSIGN_REF                                               !1, !0
   11     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/RUa3I
function name:  myfunc
number of ops:  9
compiled vars:  !0 = $global_p, !1 = $global_var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'global_p'
          1        BIND_GLOBAL                                              !1, 'global_var'
    7     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    8     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    9     8      > RETURN                                                   null

End of function myfunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.25 ms | 1397 KiB | 16 Q