3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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:  16
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   9     1        INIT_FCALL                                               'var_dump'
         2        INIT_FCALL                                               'function_exists'
         3        SEND_VAL                                                 'bar'
         4        DO_ICALL                                         $0      
         5        SEND_VAR                                                 $0
         6        DO_ICALL                                                 
  10     7        INIT_FCALL                                               'foo'
         8        DO_FCALL                                      0          
  11     9        INIT_FCALL                                               'var_dump'
        10        INIT_FCALL                                               'function_exists'
        11        SEND_VAL                                                 'bar'
        12        DO_ICALL                                         $3      
        13        SEND_VAR                                                 $3
        14        DO_ICALL                                                 
        15      > RETURN                                                   1

Function %00bar%2Fin%2FWE5Ti0x7fa1625f104d:
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%2FWE5Ti0x7fa1625f104d

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

Generated using Vulcan Logic Dumper, using php 7.3.0