3v4l.org

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.5 ms | 1398 KiB | 14 Q