3v4l.org

run code in 300+ PHP versions simultaneously
<?php $blah = false; echo "calling function \n"; try { test($blah); }catch(\Error $e){ echo "Caught\n"; print_r($e); } class Foo { } function test(\Foo $val){ echo "inside test \n"; print_r($val); echo "\n"; } echo "done\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndCY1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $blah, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <false>
    4     1        ECHO                                                     'calling+function+%0A'
    8     2        INIT_FCALL_BY_NAME                                       'test'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5      > JMP                                                      ->11
    9     6  E > > CATCH                                       last         'Error'
   10     7    >   ECHO                                                     'Caught%0A'
   11     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   24    11    >   ECHO                                                     'done%0A'
         12      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndCY1
function name:  test
number of ops:  7
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        ECHO                                                     'inside+test+%0A'
   20     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   21     5        ECHO                                                     '%0A'
   22     6      > RETURN                                                   null

End of function test

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.66 ms | 1395 KiB | 15 Q