3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { $orig = $GLOBALS; messUp(); var_dump( isset( $orig['foo'] ) ); } function messUp() { $GLOBALS['foo'] = 42; } test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BeUgm
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BeUgm
function name:  test
number of ops:  9
compiled vars:  !0 = $orig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_GLOBALS                                    ~1      
          1        ASSIGN                                                   !0, ~1
    5     2        INIT_FCALL_BY_NAME                                       'messUp'
          3        DO_FCALL                                      0          
    6     4        INIT_FCALL                                               'var_dump'
          5        ISSET_ISEMPTY_DIM_OBJ                         0  ~4      !0, 'foo'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
    7     8      > RETURN                                                   null

End of function test

Function messup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BeUgm
function name:  messUp
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_W                      global              $0      'foo'
          1        ASSIGN                                                   $0, 42
   11     2      > RETURN                                                   null

End of function messup

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.92 ms | 1015 KiB | 15 Q