I'm trying to execute "Example #1 The Built in Exception class"
in
http://www.php.net/manual/en/language.exceptions.extending.php
... However, I get 'HTTP 500 Internal Server Error'.
When I comment out all lines after 'private $previous;' it gives me
"Fatal error: Cannot redeclare class Exception in C:\...\htdocs\extended_exception01.php on line 7".
When I comment out and change the class name to 'MyException', it runs without error (but, this mustn't be what we want).
How can I execute this class?
Incidentally, I already added "Example #2 Extending the Exception class" after "Example #1", but nothing changed.
in
http://www.php.net/manual/en/language.exceptions.extending.php
... However, I get 'HTTP 500 Internal Server Error'.
When I comment out all lines after 'private $previous;' it gives me
"Fatal error: Cannot redeclare class Exception in C:\...\htdocs\extended_exception01.php on line 7".
When I comment out and change the class name to 'MyException', it runs without error (but, this mustn't be what we want).
How can I execute this class?
Incidentally, I already added "Example #2 Extending the Exception class" after "Example #1", but nothing changed.