|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-18 14:26 UTC] sander@php.net
[2002-01-18 14:26 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 01:00:01 2025 UTC |
Don't know if this is a bug or a feature... -foo.php---------------------------------------- <?php if (!$bar) { $bar = true; include(__FILE__); exit; } function foo() { return true; } ?> -/foo.php---------------------------------------- This is a VERY simplified version of a script i'm working on. foo() should only be declared once but PHP says: <b>Fatal error</b>: Cannot redeclare foo() in <b>/home/roland/tmp/foo.php</b> on line <b>7</b><br> ok, i know how a can work around this problem... in this case just put the rest of the file into the else-statement. But nevertheless it is an interesting phenomen...