3v4l.org

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

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

End of function %00foo%2Fin%2FqeTLN%3A5%240

Function %00bar%2Fin%2FqeTLN%3A6%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qeTLN
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%2FqeTLN%3A6%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.97 ms | 1396 KiB | 17 Q