3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { try { echo "1\n"; throw new Exception("E1"); } finally { try { echo "2\n"; throw new Exception("E2"); } catch (\Exception $e) { echo "3\n".$e->getMessage()."\n"; } } echo "4-\n"; } catch (\Exception $e) { echo "4+".$e->getMessage()."\n"; } echo "5\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 163) Position 1 = -2
Found catch point at position: 22
Branch analysis from position: 22
2 jumps found. (Code = 107) Position 1 = 23, Position 2 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qU4eZ
function name:  (null)
number of ops:  30
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     '1%0A'
    5     1        NEW                                              $2      'Exception'
          2        SEND_VAL_EX                                              'E1'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $2
    6     5*       FAST_CALL                                                ->7
          6*       JMP                                                      ->20
    8     7*       ECHO                                                     '2%0A'
    9     8*       NEW                                              $4      'Exception'
          9*       SEND_VAL_EX                                              'E2'
         10*       DO_FCALL                                      0          
         11*       THROW                                         0          $4
         12*       JMP                                                      ->19
   10    13  E > > CATCH                                       last         'Exception'
   11    14    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         15        DO_FCALL                                      0  $6      
         16        CONCAT                                           ~7      '3%0A', $6
         17        CONCAT                                           ~8      ~7, '%0A'
         18        ECHO                                                     ~8
         19      > FAST_RET                                                 
   14    20*       ECHO                                                     '4-%0A'
         21*       JMP                                                      ->28
   15    22  E > > CATCH                                       last         'Exception'
   16    23    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         24        DO_FCALL                                      0  $9      
         25        CONCAT                                           ~10     '4%2B', $9
         26        CONCAT                                           ~11     ~10, '%0A'
         27        ECHO                                                     ~11
   18    28        ECHO                                                     '5%0A'
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.21 ms | 1395 KiB | 13 Q