3v4l.org

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

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.94 ms | 1396 KiB | 16 Q