3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1386 KiB | 13 Q