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) { echo $e->getMessage(); // 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/s8Z8l
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     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 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s8Z8l
function name:  testing
number of ops:  17
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                                                      ->9
    9     5  E > > CATCH                                       last         'MyException'
   10     6    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
          9      > JMP                                                      ->16
   14    10  E > > CATCH                                       last         'Exception'
   15    11    >   INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !1, 'getMessage'
         13        DO_FCALL                                      0  $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
   17    16    > > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1391 KiB | 16 Q