3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($e) { echo "Uncaught: $e\n"; } set_exception_handler('foo'); try { $a = new ReflectionClass('stdClass'); } catch (ReflectionException $e) { echo "Caught: $e\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWdUr
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'foo'
          2        DO_ICALL                                                 
   10     3        NEW                                              $3      'ReflectionClass'
          4        SEND_VAL_EX                                              'stdClass'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
          7      > JMP                                                      ->13
   11     8  E > > CATCH                                       last         'ReflectionException'
   12     9    >   ROPE_INIT                                     3  ~7      'Caught%3A+'
         10        ROPE_ADD                                      1  ~7      ~7, !1
         11        ROPE_END                                      2  ~6      ~7, '%0A'
         12        ECHO                                                     ~6
   13    13    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWdUr
function name:  foo
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ROPE_INIT                                     3  ~2      'Uncaught%3A+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
    5     5      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.87 ms | 1387 KiB | 15 Q