3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('foo')) { function foo() { echo bar();} function bar() { return 'bar';} } if (true) { } foo(); bar();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
Branch analysis from position: 7
filename:       /in/FJIup
function name:  (null)
number of ops:  13
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, ->7
    3     5    >   DECLARE_FUNCTION                                         'foo'
    4     6        DECLARE_FUNCTION                                         'bar'
    6     7    > > JMPZ                                                     <true>, ->8
    9     8    >   INIT_FCALL_BY_NAME                                       'foo'
          9        DO_FCALL                                      0          
   10    10        INIT_FCALL_BY_NAME                                       'bar'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00foo%2Fin%2FFJIup%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FJIup
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%2FFJIup%3A3%240

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

End of function %00bar%2Fin%2FFJIup%3A4%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.53 ms | 1395 KiB | 15 Q