3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { throw new \Exception('Oups.'); } function bar() { return null; } try { $foo = bar(); } catch (\Exception $e) { throw new \Exception('Another one'); } finally { if ($foo === null) { throw new \Exception('Third.'); } return $foo; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 162) Position 1 = 11, Position 2 = 10
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/WIvP6
function name:  (null)
number of ops:  21
compiled vars:  !0 = $foo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'bar'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
          3      > JMP                                                      ->9
   13     4  E > > CATCH                                       last         'Exception'
   14     5    >   NEW                                              $5      'Exception'
          6        SEND_VAL_EX                                              'Another+one'
          7        DO_FCALL                                      0          
          8      > THROW                                         0          $5
   15     9    > > FAST_CALL                                                ->11
         10    > > JMP                                                      ->20
   16    11    >   TYPE_CHECK                                    2          !0
         12      > JMPZ                                                     ~7, ->17
   17    13    >   NEW                                              $8      'Exception'
         14        SEND_VAL_EX                                              'Third.'
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $8
   19    17    >   DISCARD_EXCEPTION                                        
         18      > RETURN                                                   !0
         19*       FAST_RET                                                 
   20    20    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/WIvP6
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'Oups.'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    5     4*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WIvP6
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null
    9     1*     > RETURN                                                   null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.22 ms | 1403 KiB | 14 Q