3v4l.org

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.83 ms | 1398 KiB | 14 Q