ID: 28853
User updated by: t dot noest at noestnet dot nl
Reported By: t dot noest at noestnet dot nl
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: winnt
PHP Version: 4.3.7
New Comment:
Sorry folks, but this one boils down to a corrupt FTP-client. It
removed linebreaks so the closing "}" got after the comment.
Previous Comments:
------------------------------------------------------------------------
[2004-06-20 15:51:31] t dot noest at noestnet dot nl
Description:
------------
Sometimes I get a "parse error, unexpected $end at [last line of my
script]"
I found when I add an extra "}" to my script (for wich there is not a
starting "{", I counted thorough!) it works!
So I cut my script down to the point I had a nested-if left and found
that adding a comment results in the error! Delete the comment and the
script works as expected!
This plagued me also with 4.3.6 and was the reason for me to upgrade,
but that didn't help. Both executables came from the distributed zip's.
Reproduce code:
---------------
<?PHP
# File to point some strange PHP behaviour....
$a = 10;
$b = 100;
$c = true;
$d = false;
if ($d) {
$test = true;
}else{
if ($c) {
echo "A<BR>\n";
$e = $a;
} else {
echo "B<BR>\n";
$e = $b; # wreck it with this comment!
}
}
?>
<HTML><BODY>Error Test</BODY></HTML>
Expected result:
----------------
A
Error Test
Actual result:
--------------
Parse error: parse error, unexpected $end in
E:\NoestNet\.....\error.php on line 16
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28853&edit=1