3v4l.org

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

Class MyException: [no user functions]
Class MyOtherException: [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 = 6
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
Found catch point at position: 6
Branch analysis from position: 6
filename:       /in/G0N7c
function name:  testing
number of ops:  12
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'MyException'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $1
          3*       JMP                                                      ->11
   11     4  E > > CATCH                                                    'MyException', ->6
          5    > > JMP                                                      ->7
          6  E > > CATCH                                       last         'MyOtherException'
   12     7    >   INIT_FCALL                                               'var_dump'
          8        GET_CLASS                                        ~3      !0
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
   14    11      > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.8 ms | 1395 KiB | 15 Q