3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { } class Test { public function testing() { try { try { throw new MyException('foo!'); } catch (MyException $e) { // rethrow it //throw $e; } } catch (Exception $fdvcfd) { var_dump($fdvcfd->getMessage()); } } } $foo = new Test; $foo->testing();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rj5jD
function name:  (null)
number of ops:  6
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          
          5      > 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: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rj5jD
function name:  testing
number of ops:  14
compiled vars:  !0 = $e, !1 = $fdvcfd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'MyException'
          1        SEND_VAL_EX                                              'foo%21'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
          4*       JMP                                                      ->6
    9     5  E > > CATCH                                       last         'MyException'
          6    > > JMP                                                      ->13
   13     7  E > > CATCH                                       last         'Exception'
   14     8    >   INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                                 
   16    13    > > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.89 ms | 1395 KiB | 15 Q