|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-29 17:43 UTC] yohgaki at dd dot iij4u dot or dot jp
PHP fails to report missing "}".
I could not reproduce this problem with simpler script. However, it happens on both Linux and W2K on longer script. (I think it may be easily to reproduce this problem if you get rid of "}" in 1000-2000 lines script with a lot of class definitions)
PHP4.0.4pl1 - as Apache module under Linux
PHP4.0.4RC1 - as Apache module under W2K
IE just keeps spinning or complains "no server or DNS error".
Problem happens on code like:
============
class foo{
function bar($str) {
switch ($str) {
case 'a':
if (isset($var)) {
echo 'No } after this line';
break;
}
}
============
This kind of programming error is easy to find with good editor, though.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 07:00:01 2025 UTC |
Ok for bogus. So I changed stuts to Closed. It's rather easy to find what's wrong in code even if PHP does not report parse errors on browser. Just FYI. I collect files that produce this problem in a single directory to test against newer PHP versions. Then PHP starts reporting errors. w/o changing codes except require_once(INCLUDE_PATH.'file_to_include.inc'); to require_once('file_to_include.inc'); and other few lines need to be changed. I thought it would be easy to reproduce this problem at first. However, it seems really hard to do. (I've also tried with other files) Since I need to edit these files to make it work, if you need me to keep them for later reference. Please let me know ASAP, I'll left these files that causes this problem as is about 2 hours.