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->getMessage() . PHP_EOL; echo '===========' . PHP_EOL . $e->getPrevious()->getMessage() . PHP_EOL . '==========='; }
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/fWcK1
function name:  (null)
number of ops:  26
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                                                      ->25
    9    12  E > > CATCH                                       last         'Exception'
   10    13    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         14        DO_FCALL                                      0  $6      
         15        CONCAT                                           ~7      $6, '%0A'
         16        ECHO                                                     ~7
   11    17        INIT_METHOD_CALL                                         !0, 'getPrevious'
         18        DO_FCALL                                      0  $8      
         19        INIT_METHOD_CALL                                         $8, 'getMessage'
         20        DO_FCALL                                      0  $9      
         21        CONCAT                                           ~10     '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A', $9
         22        CONCAT                                           ~11     ~10, '%0A'
         23        CONCAT                                           ~12     ~11, '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D'
         24        ECHO                                                     ~12
   12    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.59 ms | 1398 KiB | 13 Q