From: Operating system: Windows 7 SP 1 PHP version: 5.3.6 Package: Unknown/Other Function Bug Type: Bug Bug description:Break execution when the inclusion of a class
Description: ------------ Hello. The problem is simple but critical: when I include a file containing a class, most of the time, no problem. However, sometimes it shuts off the script without any error. A sharp break without any explanation. Moreover, this happens with classes in various names, depending on the time. Currently, with classes named "Wnl_Date", "Wnl_Controller" and "Wnl_View_Helper_Url". The auto-load classes are called conventionally (Wnl_View_Helper_Url) statically (Wnl_Dateà or by inheritance (Wnl_Controller). This problem suddenly appeared a few days ago. At first, it appeared from time to time, now it's all the time. And this bug stops me completely! I use PHP with easyPHP (the last version), a WAMP software. Test script: --------------- I do not really have an example code: This problem occurs in variety of cases, while the inclusion of a class, either directly or via an autoloader. Code of the autoloader: <?php // Preliminary codes define('S', DIRECTORY_SEPARATOR, true); define('ROOT_PATH', dirname(__FILE__), true); define('LIB_PATH', ROOT_PATH.S.'lib'.S.'php'.S, true); /** * This function replace the slash (/) by anti-slash, if needed. * @param $path string The path to edit. * @return The good path, with \ (Win) or / (other). */ function rs($path) { $path = str_replace('/', S, $path); $path = str_replace('\\', S, $path); return $path; } function __autoload($classe) { if(preg_match('#^Zend_#', $classe)) { $classe = str_replace('_', S, $classe); require_once(rs($classe . '.php')); } else { $classe = str_replace('_', S, $classe); require_once(rs(LIB_PATH . $classe . '.php')); } } ?> Direct version : <?php include(ROOT_PATH . '/lib/php/Wnl/Date.php'); ?> Expected result: ---------------- The inclusion of the class. Actual result: -------------- The execution is stopped without any error message, explanation or other. -- Edit bug report at https://bugs.php.net/bug.php?id=55422&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55422&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55422&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55422&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55422&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55422&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55422&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55422&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55422&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55422&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55422&r=support Expected behavior: https://bugs.php.net/fix.php?id=55422&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55422&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55422&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55422&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55422&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55422&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55422&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55422&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55422&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55422&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55422&r=mysqlcfg