3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1 = "1"; $var2 = "2"; function foo() { var_dump($GLOBALS['var3'] ?? $GLOBALS['var2']); } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h6lRG
function name:  (null)
number of ops:  5
compiled vars:  !0 = $var1, !1 = $var2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1'
    4     1        ASSIGN                                                   !1, '2'
   10     2        INIT_FCALL                                               'foo'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h6lRG
function name:  foo
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_IS                                         ~0      'GLOBALS'
          2        FETCH_DIM_IS                                     ~1      ~0, 'var3'
          3        COALESCE                                         ~2      ~1
          4        FETCH_R                      global              ~3      'GLOBALS'
          5        FETCH_DIM_R                                      ~4      ~3, 'var2'
          6        QM_ASSIGN                                        ~2      ~4
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
    8     9      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.36 ms | 1397 KiB | 16 Q