From: Operating system: Debian/Ubuntu/MacOS PHP version: 5.3.6 Package: Class/Object related Bug Type: Bug Bug description:Files with classes are included, but classes are not defined correctly
Description: ------------ After updating our php code (added some classes, have rewritten some functionality) one of our utilites stopped to work. After deep digging we found that php doesn't define a class in some circumstances. In attachment is our handmade example. Try to run file0.php On 5.2.17 and 5.3.2 we have output: /home/vitaly/.../public_html/file3.php /home/vitaly/.../public_html/file4.php /home/vitaly/.../public_html/file2.php /home/vitaly/.../public_html/file1.php /home/vitaly/.../public_html/file0.php On 5.3.5: Fatal error: Class 'Class1' not found in /.../file3.php on line 6 On our real project (which uses 5.2.17) ^^ we have the same fatal error. Project is very big and has many includes, so we can't provide simple example for it, but probably changing example from attachment to one or another side will do the trick.. We don't have 5.3.6 version, yes, we out of date, but I think this is something that's will reoccur from one version to another. Expected result: ---------------- Run file0.php I expect to have loading sequence Actual result: -------------- On some php version I have fatal error that class is undefined. -- Edit bug report at https://bugs.php.net/bug.php?id=55369&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55369&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55369&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55369&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55369&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55369&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55369&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55369&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55369&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55369&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55369&r=support Expected behavior: https://bugs.php.net/fix.php?id=55369&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55369&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55369&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55369&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55369&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55369&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55369&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55369&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55369&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55369&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55369&r=mysqlcfg