3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function ($c) { eval("class {$c} extends Exception { }"); }); try { throw new FooException('foo'); } catch (FooException $e) { throw new BarException('bar'); } catch (BarException $e) { echo 'hallo!'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 15
Branch analysis from position: 15
filename:       /in/Qjt50
function name:  (null)
number of ops:  18
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQjt50%3A3%240'
    5     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    8     4        NEW                                              $3      'FooException'
          5        SEND_VAL_EX                                              'foo'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
          8*       JMP                                                      ->17
    9     9  E > > CATCH                                                    'FooException', ->15
   10    10    >   NEW                                              $5      'BarException'
         11        SEND_VAL_EX                                              'bar'
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $5
         14*       JMP                                                      ->17
   11    15  E > > CATCH                                       last         'BarException'
   12    16    >   ECHO                                                     'hallo%21'
   13    17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FQjt50%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qjt50
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ROPE_INIT                                     3  ~2      'class+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '+extends+Exception+%7B+%7D'
          4        INCLUDE_OR_EVAL                                          ~1, EVAL
    5     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQjt50%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.53 ms | 1388 KiB | 15 Q