3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { function bar() { echo "surprise!\n"; } } var_dump(function_exists('bar')); foo(); var_dump(function_exists('bar'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WE5Ti
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'function_exists'
          2        SEND_VAL                                                 'bar'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   10     6        INIT_FCALL                                               'foo'
          7        DO_FCALL                                      0          
   11     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'function_exists'
         10        SEND_VAL                                                 'bar'
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function foo

Function %00bar%2Fin%2FWE5Ti%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WE5Ti
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'surprise%21%0A'
    6     1      > RETURN                                                   null

End of function %00bar%2Fin%2FWE5Ti%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.88 ms | 1398 KiB | 18 Q