3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { } class Test { public function testing() { try { throw new Exception(); } catch (Exception $e) { echo '1234'; return 'fun1'; } finally { return 'fun2'; } } } $foo = new Test; echo $foo->testing();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZBrqm
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'testing'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class MyException: [no user functions]
Class Test:
Function testing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) 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
2 jumps found. (Code = 162) Position 1 = 10, Position 2 = 7
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZBrqm
function name:  testing
number of ops:  14
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'Exception'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $2
          3*       JMP                                                      ->8
    9     4  E > > CATCH                                       last         'Exception'
   10     5    >   ECHO                                                     '1234'
   11     6      > FAST_CALL                                                ->10
          7    > > RETURN                                                   'fun1'
   12     8*       FAST_CALL                                                ->10
          9*       JMP                                                      ->13
   13    10    >   DISCARD_EXCEPTION                                        
         11      > RETURN                                                   'fun2'
         12*       FAST_RET                                                 
   15    13*     > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.96 ms | 1394 KiB | 13 Q