3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { try { throw new Exception('Foo'); } finally { throw new Exception('Bar'); } } catch(Exception $exception) { var_dump($exception); var_dump($exception->getPrevious()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 12
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
filename:       /in/9DMoe
function name:  (null)
number of ops:  22
compiled vars:  !0 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'Exception'
          1        SEND_VAL_EX                                              'Foo'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
    7     4*       FAST_CALL                                                ->6
          5*       JMP                                                      ->11
    8     6*       NEW                                              $4      'Exception'
          7*       SEND_VAL_EX                                              'Bar'
          8*       DO_FCALL                                      0          
          9*       THROW                                         0          $4
         10*       FAST_RET                                                 
         11*       JMP                                                      ->21
   11    12  E > > CATCH                                       last         'Exception'
   12    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   13    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !0, 'getPrevious'
         18        DO_FCALL                                      0  $7      
         19        SEND_VAR                                                 $7
         20        DO_ICALL                                                 
   14    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.58 ms | 1395 KiB | 15 Q