|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-07 17:38 UTC] djanix at hotmail dot com
just a quick feature request...
how about a warning for assignment inside of an expression, like most c compilers will generate...
" if ( $a = false ) { "
would generate a warning... if u had the warning enabled of course....
i'm surprised it doesn't already do that...
-benjamin+
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 02:00:01 2025 UTC |
Not possible: if ($xx = some_function()) {} is perfectly legal.on a side note, it is a good practice to swap the 'assignment arguments': if ('foo' == $bar), since 'foo' = $bar does produce a warning.