PHP 4.0 Bug #9631 Updated: if(condition); works without warning/error!!
| From: | stas@php.net | Date: | Thu, 08 Mar 2001 17:31:22 +0000 |
| Subject: | PHP 4.0 Bug #9631 Updated: if(condition); works without warning/error!! | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48290@lists.php.net to get a copy of this message | ||
ID: 9631
Updated by: stas
Reported By: slicky@newshelix.com
Old-Status: Open
Status: Closed
Old-Bug Type: Compile Warning
Bug Type: Scripting Engine problem
Assigned To:
Comments:
Yes, this is a valid construct. The syntax of if operator is:
'if(' expression ')' statement
';' alone is a valid statement (just like in C). So that
code is valid. PHP cannot really determine if it's
"meaningful" or not for you.
Previous Comments:
---------------------------------------------------------------------------
[2001-03-08 12:21:49] slicky@newshelix.com
I don't know if you noticed that but
if(condition);
works. It won't give out any error or warning, while using the currently latest version
(4.04pl/win).
I don't know if that's the intention of the programmers but IMO it's more likly a
bug, since it doesn't make any sense anywhere i could think so far.
Please let me know if that's fixed soon.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9631&edit=2