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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.87 ms | 1389 KiB | 14 Q