3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { try { throw new \Exception('1'); } finally { throw new \Exception('2'); } } catch (\Exception $e) { echo $e->getPrevious()->getMessage(); }
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/EbtNF
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'Exception'
          1        SEND_VAL_EX                                              '1'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
    6     4*       FAST_CALL                                                ->6
          5*       JMP                                                      ->11
    7     6*       NEW                                              $4      'Exception'
          7*       SEND_VAL_EX                                              '2'
          8*       DO_FCALL                                      0          
          9*       THROW                                         0          $4
         10*       FAST_RET                                                 
         11*       JMP                                                      ->18
    9    12  E > > CATCH                                       last         'Exception'
   10    13    >   INIT_METHOD_CALL                                         !0, 'getPrevious'
         14        DO_FCALL                                      0  $6      
         15        INIT_METHOD_CALL                                         $6, 'getMessage'
         16        DO_FCALL                                      0  $7      
         17        ECHO                                                     $7
   11    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.84 ms | 1393 KiB | 13 Q