3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { throw new InvalidArgumentException("1"); } catch (InvalidArgumentException $e) { echo "Caught 1"; throw new Exception("2"); } catch (Exception $e2) { echo "Caught 2"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
filename:       /in/va0KI
function name:  (null)
number of ops:  15
compiled vars:  !0 = $e, !1 = $e2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'InvalidArgumentException'
          1        SEND_VAL_EX                                              '1'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
          4*       JMP                                                      ->14
    4     5  E > > CATCH                                                    'InvalidArgumentException', ->12
    5     6    >   ECHO                                                     'Caught+1'
    6     7        NEW                                              $4      'Exception'
          8        SEND_VAL_EX                                              '2'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $4
         11*       JMP                                                      ->14
    7    12  E > > CATCH                                       last         'Exception'
    8    13    >   ECHO                                                     'Caught+2'
    9    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.54 ms | 1393 KiB | 13 Q