3v4l.org

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

Function bleh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gC1Oe
function name:  bleh
number of ops:  4
compiled vars:  !0 = $omg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                                 
    8     3      > RETURN                                                   null

End of function bleh

Function bleh_global:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gC1Oe
function name:  bleh_global
number of ops:  5
compiled vars:  !0 = $omg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_GLOBAL                                              !0, 'omg'
   12     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   13     4      > RETURN                                                   null

End of function bleh_global

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.41 ms | 999 KiB | 16 Q