3v4l.org

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165 ms | 1398 KiB | 14 Q