3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = new stdClass(); function foo (string $bar) { } try { foo($a); } catch (\Throwable $t) { echo "Caught " . get_class($t); }
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: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lF7gR
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $t
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'stdClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    9     3        INIT_FCALL                                                   'foo'
          4        SEND_VAR                                                     !0
          5        DO_FCALL                                          0          
          6      > JMP                                                          ->11
   10     7  E > > CATCH                                           last         'Throwable'
   11     8    >   GET_CLASS                                            ~6      !1
          9        CONCAT                                               ~7      'Caught+', ~6
         10        ECHO                                                         ~7
   12    11    > > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lF7gR
function name:  foo
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1      > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.47 ms | 2549 KiB | 14 Q