ID: 10162 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Unknown/Other Function Assigned To: Comments: Please check this manual page: http://www.php.net/manual/en/language.operators.precedence.php Not a bug. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-04-04 11:59:37] [EMAIL PROTECTED] in the case shown below both operators generate different values, once TRUE twice FALSE source code <?php function isValid_and($a) { $valid = true; $b = 1; $valid = $valid and (strlen($a) >= $b); return $valid; } function isValid_and_($a) { $valid = true; $b = 1; $valid = $valid && (strlen($a) >= $b); return $valid; } $a = ""; if (isValid_and($a)) echo "and - true<br/>"; else echo "and - false<br/>"; if (isValid_and_($a)) echo "&& - true<br/>"; else echo "&& - false<br/>"; ?> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10162&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]