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 1; return 'fun1'; } finally { echo 2; 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/jXRqG
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     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/jXRqG
function name:  testing
number of ops:  15
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                                                     1
   11     6      > FAST_CALL                                                ->10
          7    > > RETURN                                                   'fun1'
   12     8*       FAST_CALL                                                ->10
          9*       JMP                                                      ->14
   13    10    >   ECHO                                                     2
   14    11        DISCARD_EXCEPTION                                        
         12      > RETURN                                                   'fun2'
         13*       FAST_RET                                                 
   16    14*     > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.75 ms | 1394 KiB | 13 Q