Re: Bug #921: funcs not returning false in assignment context

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Bug #921: funcs not returning false in assignment context
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-2417@lists.php.net to get a copy of this message
> In an assignment context: > > $doterms = $doterms and ereg(...) and eregi(...); Are you actually using the 'and' operator here? The whole point of the 'and' operator is that it has an extremely low priority in the operator preference order. Even lower than '='. eg. $a = 1 and 0; This will actually do: ($a = 1) and 0 and will thus result in $a always being 1. $a = 1 && 0; This is the same as: $a = (1 && 0) and will result in $a being 0. Let me know if this is the cause of your confusion so I can close the bug report. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2417) next »