3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exceptionTest() { try { throw new TestException(); } catch (TestException $e) { echo "Caught TestException ('{$e->getMessage()}')\n{$e}\n"; } catch (Exception $e) { echo "Caught Exception ('{$e->getMessage()}')\n{$e}\n"; } } echo '<pre>' . exceptionTest() . '</pre>'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iaD3F
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'exceptiontest'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      '%3Cpre%3E', $0
          3        CONCAT                                           ~2      ~1, '%3C%2Fpre%3E'
          4        ECHO                                                     ~2
   16     5      > RETURN                                                   1

Function exceptiontest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 14
Branch analysis from position: 14
filename:       /in/iaD3F
function name:  exceptionTest
number of ops:  24
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $1      'TestException'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $1
          3*       JMP                                                      ->23
    7     4  E > > CATCH                                                    'TestException', ->14
    8     5    >   ROPE_INIT                                     5  ~5      'Caught+TestException+%28%27'
          6        INIT_METHOD_CALL                                         !0, 'getMessage'
          7        DO_FCALL                                      0  $3      
          8        ROPE_ADD                                      1  ~5      ~5, $3
          9        ROPE_ADD                                      2  ~5      ~5, '%27%29%0A'
         10        ROPE_ADD                                      3  ~5      ~5, !0
         11        ROPE_END                                      4  ~4      ~5, '%0A'
         12        ECHO                                                     ~4
         13      > JMP                                                      ->23
   10    14  E > > CATCH                                       last         'Exception'
   11    15    >   ROPE_INIT                                     5  ~10     'Caught+Exception+%28%27'
         16        INIT_METHOD_CALL                                         !0, 'getMessage'
         17        DO_FCALL                                      0  $8      
         18        ROPE_ADD                                      1  ~10     ~10, $8
         19        ROPE_ADD                                      2  ~10     ~10, '%27%29%0A'
         20        ROPE_ADD                                      3  ~10     ~10, !0
         21        ROPE_END                                      4  ~9      ~10, '%0A'
         22        ECHO                                                     ~9
   13    23    > > RETURN                                                   null

End of function exceptiontest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1390 KiB | 14 Q