3v4l.org

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

Function %00foo%2Fin%2Fi4t7j%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i4t7j
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'bar'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   null

End of function %00foo%2Fin%2Fi4t7j%3A3%240

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

End of function %00bar%2Fin%2Fi4t7j%3A6%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1396 KiB | 15 Q