|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-10 19:07 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu May 14 18:00:01 2026 UTC |
Description: ------------ I have a class called "Subject" which I use for a long time now, but when I tried to use the code with 5.1b2 I got: Fatal error: Cannot redeclare class subject... Simple renaming the class to MailSubject fixes the problem. But I did not redeclare this class, I did a search like "grep -ir subject *" I tried some test-scrips: <?php var_dump(class_exists('Subject')); ?> bool(false) <?php Test {} class Subject { } ?> Fatal error: Cannot redeclare class subject in /var/www/localhost/htdocs/subject.php on line 3 <?php Test {} class Subject extends Test { } ?> Fatal error: Cannot redeclare class subject in /var/www/localhost/htdocs/subject.php on line 4 (If I extend, error is found in line 4, not 3 ?!). I'm using Apache-sapi with Apache 1.3.33. Reproduce code: --------------- <?php class Subject {} ?> Expected result: ---------------- empty page Actual result: -------------- Fatal error: Cannot redeclare class subject in /var/www/localhost/htdocs/subject.php on line 2