ID: 26464 Updated by: [EMAIL PROTECTED] Reported By: php at jmvware dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: SunOS/Linux/Windows PHP Version: 4.3.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php RTFM: http://docs.php.net/operators Previous Comments: ------------------------------------------------------------------------ [2003-11-29 11:13:47] php at jmvware dot com Description: ------------ If the expression portion of the ternary operator is a mutliple comparison expression the && operator does NOT return the same results as the AND operator. Reproduce code: --------------- This works as expected: $a=5; $b=($a>1 && $a<10 ? 'yes' : 'no'); echo "$b<BR>"; // returns 'yes' Note, using AND in place of && $a=5; $b=($a>1 AND $a<10 ? 'yes' : 'no'); echo "$b<BR>"; // returns 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26464&edit=1