ID: 15105
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Duplicate
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.1.1
New Comment:
It's a dupe... can't find the bug anymore, but it is a dupe.
Previous Comments:
------------------------------------------------------------------------
[2002-01-18 14:14:02] [EMAIL PROTECTED]
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...
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=15105&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]