|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-08 12:21 UTC] slicky at newshelix dot 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 16:00:01 2025 UTC |
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.