3v4l.org

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.8 ms | 1389 KiB | 14 Q