3v4l.org

run code in 500+ PHP versions simultaneously
<?php function test() { try { throw new \RuntimeException('Test 1'); } catch (\RuntimeException $e) { throw new \RuntimeException('Test 2'); } finally { return 'finally'; } } echo test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cRSFZ
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/cRSFZ
function name:  test
number of ops:  16
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $2      'RuntimeException'
          1        SEND_VAL_EX                                                  'Test+1'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $2
          4*       JMP                                                          ->10
    6     5  E > > CATCH                                           last         'RuntimeException'
    7     6    >   NEW                                                  $4      'RuntimeException'
          7        SEND_VAL_EX                                                  'Test+2'
          8        DO_FCALL                                          0          
          9      > THROW                                             0          $4
    9    10*       FAST_CALL                                                    ->12
         11*       JMP                                                          ->15
   10    12*       DISCARD_EXCEPTION                                            
         13*       RETURN                                                       'finally'
         14*       FAST_RET                                                     
   12    15*     > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.79 ms | 2128 KiB | 14 Q