|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-23 11:24 UTC] t dot noest at noestnet dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 13:00:01 2025 UTC |
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