|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-02 04:20 UTC] didou@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 23:00:01 2025 UTC |
Description: ------------ I tried to execute the example for interfaces in PHP 5.0.0b (beta 2) and got this result: Fatal error: Cannot redeclare class exception in /home/billy/public_html/php5/interface.php on line 6 When I changed the word "Exception" to "Exception1" the code ran without a problem. Probably the example needs to be changed, but I am not sure. Bill Patterson Reproduce code: --------------- <?php interface Throwable { public function getMessage(); } class Exception implements Throwable { public function getMessage() { // ... } } ?> Expected result: ---------------- expect a blank page Actual result: -------------- Fatal error: Cannot redeclare class exception in /home/billy/public_html/php5/interface.php on line 6