3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X extends \TypeError { } try { try { throw new X('extended throwable'); } catch (\Throwable $t) { throw new \Exception ($t->getMessage(), 0, $t); } } catch (\Exception $ex) { echo $ex->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WvHeG
function name:  (null)
number of ops:  20
compiled vars:  !0 = $t, !1 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'X'
          1        SEND_VAL_EX                                              'extended+throwable'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
          4*       JMP                                                      ->14
   11     5  E > > CATCH                                       last         'Throwable'
   12     6    >   NEW                                              $4      'Exception'
          7        INIT_METHOD_CALL                                         !0, 'getMessage'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR_NO_REF_EX                                       $5
         10        SEND_VAL_EX                                              0
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $4
         14*       JMP                                                      ->19
   14    15  E > > CATCH                                       last         'Exception'
   15    16    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         17        DO_FCALL                                      0  $7      
         18        ECHO                                                     $7
   16    19      > RETURN                                                   1

Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.78 ms | 1394 KiB | 13 Q