|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-03-05 11:00 UTC] dmitry@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: dmitry
[2013-03-05 11:00 UTC] dmitry@php.net
[2013-03-15 20:47 UTC] dmitry@php.net
[2013-11-17 09:31 UTC] laruence@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 15:00:02 2025 UTC |
Description: ------------ php-5.5.0alpha5-nts-Win32-VC11-x86 PHP 5.5.0alpha5 (cli) (built: Feb 21 2013 17:11:43) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.5.0-dev, Copyright (c) 1998-2013 Zend Technologies with Zend Optimizer+ v7.0.0, Copyright (c) 1999-2013, by Zend Technologies There is a strange issue with Optimizer+ when some loaded classes can "disappear". It's related to the dynamic includes and filter system. Go! AOP library uses this technique to perform "monkey-patching" before PHP parser. Test script: --------------- https://gist.github.com/lisachenko/00fa92f811511f347e3a // bug.php <?php class BugLoader extends php_user_filter { public function filter($in, $out, &$consumed, $closing) { eval("class Test extends ArrayObject {}"); return PSFS_PASS_ON; } } function dynamicInclude() { return "php://filter/read=bug.test/resource=test.php"; } echo "ArrayObject class ", class_exists('ArrayObject') ? 'exists' : 'not found'; stream_filter_register('bug.test', 'BugLoader'); include dynamicInclude(); //test.php <?php // Empty file here Expected result: ---------------- ArrayObject class exists Actual result: -------------- ArrayObject class exists Fatal error: Class 'ArrayObject' not found in ~/bug.php(7) : eval()'d code on line 1