3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { try { return 'bar'; } catch (\Exception $ex) { throw $ex; } finally { return 'baz'; } } echo foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H9A1j
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 7, Position 2 = 1
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/H9A1j
function name:  foo
number of ops:  11
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > FAST_CALL                                                ->7
          1    > > RETURN                                                   'bar'
          2*       JMP                                                      ->5
          3  E > > CATCH                                       last         'Exception'
          4    > > THROW                                         0          !0
          5*       FAST_CALL                                                ->7
          6*       JMP                                                      ->10
          7    >   DISCARD_EXCEPTION                                        
          8      > RETURN                                                   'baz'
          9*       FAST_RET                                                 
    5    10*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.92 ms | 1397 KiB | 14 Q