|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-30 09:49 UTC] stas@php.net
[2000-08-30 09:57 UTC] waldschrott@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 11:00:02 2025 UTC |
this is test.php file <? for ($cnt = 0; $cnt<5; ++$cnt){ require("test.inc.php"); a($cnt); } echo "ok"; ?> ----------- and here is <? function a($cnt){ echo $cnt; return; } ?> ---- the result is 0 Fatal error: Cannot redeclare a() in Unknown on line 3 ------- it is not necessary a bug since if the require is replaced by the code itself it gives the same error. But why the behavior is changed, in previous versions it works