3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { try { throw new Exception(); return 1; } catch (Exception $e) { print "Exception!\n"; return 2; } finally { print "Finally called!\n"; return 3; } } var_dump(foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/44b2G
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function foo:
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 = 12, Position 2 = 9
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/44b2G
function name:  foo
number of ops:  17
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'Exception'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $2
    8     3*       FAST_CALL                                                ->12
          4*       RETURN                                                   1
          5*       JMP                                                      ->10
    9     6  E > > CATCH                                       last         'Exception'
   10     7    >   ECHO                                                     'Exception%21%0A'
   11     8      > FAST_CALL                                                ->12
          9    > > RETURN                                                   2
   12    10*       FAST_CALL                                                ->12
         11*       JMP                                                      ->16
   13    12    >   ECHO                                                     'Finally+called%21%0A'
   14    13        DISCARD_EXCEPTION                                        
         14      > RETURN                                                   3
         15*       FAST_RET                                                 
   16    16*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.06 ms | 1389 KiB | 16 Q