3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo { const BAZ = 42; const AAZ = 24; function bar() { return 'foo.bar'; } function aar() { return 'foo.bar2'; } } namespace { use function foo\bar as foo_bar, foo\aar as foo_bar2; use const foo\BAZ as FOO_BAZ, foo\AAZ as FOO_BAZ2; var_dump(foo_bar()); var_dump(FOO_BAZ); var_dump(foo_bar2()); var_dump(FOO_BAZ2); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WPkTN
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'foo%5CBAZ', 42
    4     1        DECLARE_CONST                                            'foo%5CAAZ', 24
   15     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'foo%5Cbar'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   16     7        INIT_FCALL                                               'var_dump'
          8        FETCH_CONSTANT                                   ~2      'foo%5CBAZ'
          9        SEND_VAL                                                 ~2
         10        DO_ICALL                                                 
   18    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'foo%5Caar'
         13        DO_FCALL                                      0  $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                                 
   19    16        INIT_FCALL                                               'var_dump'
         17        FETCH_CONSTANT                                   ~6      'foo%5CAAZ'
         18        SEND_VAL                                                 ~6
         19        DO_ICALL                                                 
   20    20      > RETURN                                                   1

Function foo%5Cbar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WPkTN
function name:  foo\bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'foo.bar'
    7     1*     > RETURN                                                   null

End of function foo%5Cbar

Function foo%5Caar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WPkTN
function name:  foo\aar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   'foo.bar2'
   10     1*     > RETURN                                                   null

End of function foo%5Caar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.4 ms | 1399 KiB | 17 Q