#23400 [NEW]: "print(2 or 3)" returns wrong result

From: Date: Tue, 29 Apr 2003 07:29:17 +0000
Subject: #23400 [NEW]: "print(2 or 3)" returns wrong result
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38690@lists.php.net to get a copy of this message
From: akukula at min dot pl Operating system: Linux PHP version: 4.3.1 PHP Bug Type: *Programming Data Structures Bug description: "print(2 or 3)" returns wrong result Bash command line: $ echo '<?php print(2 or 3) ?>' | php The result is 1 $ echo '<?php $i = 2 or 3; print($i) ?>' | php The result is 2 According to documentation (e.g. the chapter on operators) it should return '2' in both examples. Kind regards, Andrzej Kukula -- Edit bug report at http://bugs.php.net/?id=23400&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23400&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23400&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23400&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23400&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23400&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23400&r=support Expected behavior: http://bugs.php.net/fix.php?id=23400&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23400&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23400&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23400&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23400&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23400&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23400&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23400&r=gnused

« previous php.bugs (#38690) next »