3v4l.org

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.85 ms | 943 KiB | 15 Q