3v4l.org

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

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

End of function %00foo%2Fin%2FjZvOZ%3A7%240

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

End of function %00bar%2Fin%2FjZvOZ%3A8%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.09 ms | 1396 KiB | 17 Q