|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
|
Your comment was added to the bug successfully.
[2014-12-30 16:28 UTC] pegasus at vaultwiki dot org
Description: ------------ In the process of trying to debug this issue on my end: https://bugs.php.net/bug.php?id=68453 I want to note that other bug was never resolved by the PHP team. I provided as much feedback as I could with the minimal suggestions that were made, but the bug was closed as if I never did. The change in bucket order mentioned in the report -still- results in an infinite loop in scripts using PHP master when some objects recursively call instances of themselves (it seems that a method's static variables might not be available on a second pass until the first call of the containing method that should have already created the static has completed). If someone can reopen the issue and look into it again, it would be appreciated. Now, in the process of trying to debug that issue without any help from the PHP team, I discovered that PHP was also throwing a fatal error if the recursion was bypassed: Fatal error: Cannot redeclare class [class_already_declared] in [file_that_doesnt_declare_that_class_at_all] on line 0 As I've noted in the message itself, the class HAS been declared already. However, the error message says that a specific file is trying to redeclare it. The file claimed does not even include the name of the class in so much as a string, and does not include any files that do either. The fact that the error gives "line 0" in the "problematic" file is also not useful information from a development standpoint. This error is reproducible and always states that the same class is trying to re-declare from that same file. It does not matter whether opcache is disabled or enabled. This error does NOT occur in PHP 5.6.4. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Feb 07 15:00:02 2026 UTC |
Found this bug active on debian jessie with PHP Version 5.6.17 Try this little code: class c2 extends c1 { function demo(){ print("Child"); } } class c1{ function demo(){ print("Mother"); } } $demo=new c2(); $demo->demo(); When calling this code twice (!) - you will get the error. And then change position of c2 and c1: no problems any more.