3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class SkipTryCatchFinallyDifferentType { public function run() { try { return 1; } catch (\RuntimeException $e) { return 2; } finally { return "A"; } } } $a = new SkipTryCatchFinallyDifferentType(); var_dump($a->run());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BRgUn
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'SkipTryCatchFinallyDifferentType'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'run'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class SkipTryCatchFinallyDifferentType:
Function run:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 8, Position 2 = 1
Branch analysis from position: 8
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
2 jumps found. (Code = 162) Position 1 = 8, Position 2 = 5
Branch analysis from position: 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BRgUn
function name:  run
number of ops:  12
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > FAST_CALL                                                ->8
          1    > > RETURN                                                   1
          2*       JMP                                                      ->6
    9     3  E > > CATCH                                       last         'RuntimeException'
   10     4    > > FAST_CALL                                                ->8
          5    > > RETURN                                                   2
   11     6*       FAST_CALL                                                ->8
          7*       JMP                                                      ->11
   12     8    >   DISCARD_EXCEPTION                                        
          9      > RETURN                                                   'A'
         10*       FAST_RET                                                 
   14    11*     > RETURN                                                   null

End of function run

End of class SkipTryCatchFinallyDifferentType.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.1 ms | 1016 KiB | 14 Q