|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-07-24 12:46 UTC] cschneid@php.net
Description: ------------ Our codebase triggered "E_WARNING: Narrowing occurred during type inference. Please file a bug report on bugs.php.net" in our class loader which is installed using spl_autoload_register(). When trying to fetch the page a second time it reports "Fatal error: Cannot declare class xy, because the name is already in use in xy.class on line 3" Doing sudo apachectl graceful to clear the opcache and reloading bring the Narrowing warning again. I don't have a short reproduction script but I still reported the bug as the warning says so :-) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
I managed to produce a test file narrowing.php <?php class A { static function foo() { foreach ([] as $value) $arr["foo"]["bar"] = $value; foreach ($arr as $value) bar($value + []); } } with a php.ini like zend_extension = opcache.so opcache.enable_cli = 1 and then calling it with php -c php.ini narrowing.php results in Warning: Narrowing occurred during type inference. Please file a bug report on bugs.php.net in Unknown on line 0