3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A\B { function f($foo = FOO) { var_dump($foo); var_dump(FOO); } } namespace { define('FOO', 'foo bar'); \A\B\f(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IfUVW
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'FOO'
          2        SEND_VAL                                                 'foo+bar'
          3        DO_ICALL                                                 
   12     4        INIT_FCALL                                               'a%5Cb%5Cf'
          5        DO_FCALL                                      0          
   13     6      > RETURN                                                   1

Function a%5Cb%5Cf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IfUVW
function name:  A\B\f
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <const ast>
    5     1        INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cvar_dump'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    6     4        INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cvar_dump'
          5        FETCH_CONSTANT                                   ~2      'A%5CB%5CFOO'
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0          
    7     8      > RETURN                                                   null

End of function a%5Cb%5Cf

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.81 ms | 1401 KiB | 18 Q