3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$var1 = "1"; $var2 = "2"; function foo() { global $var1, $var2; var_dump($var1 ?? $var2); } foo();
based on t69Tr
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/DncjP
function name:  (null)
number of ops:  5
compiled vars:  !0 = $var2
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   ASSIGN                                                   !0, '2'
   6     1        NOP                                                      
  11     2        INIT_FCALL                                               'foo'
         3        DO_FCALL                                      0          
         4      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
Jump found. 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 7.3.0