3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { try { throw new \RuntimeException('Test 1'); } catch (\RuntimeException $e) { throw new \RuntimeException('Test 2'); } finally { return $error->getMessage(); } } echo test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZJ6XI
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function test:
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
filename:       /in/ZJ6XI
function name:  test
number of ops:  18
compiled vars:  !0 = $e, !1 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $3      'RuntimeException'
          1        SEND_VAL_EX                                              'Test+1'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $3
          4*       JMP                                                      ->10
    6     5  E > > CATCH                                       last         'RuntimeException'
    7     6    >   NEW                                              $5      'RuntimeException'
          7        SEND_VAL_EX                                              'Test+2'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $5
    9    10*       FAST_CALL                                                ->12
         11*       JMP                                                      ->17
   10    12*       INIT_METHOD_CALL                                         !1, 'getMessage'
         13*       DO_FCALL                                      0  $7      
         14*       DISCARD_EXCEPTION                                        
         15*       RETURN                                                   $7
         16*       FAST_RET                                                 
   12    17*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.07 ms | 1398 KiB | 14 Q