#23400 [Opn->Bgs]: "print(2 or 3)" returns wrong result

From: Date: Tue, 29 Apr 2003 15:39:31 +0000
Subject: #23400 [Opn->Bgs]: "print(2 or 3)" returns wrong result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38742@lists.php.net to get a copy of this message
ID: 23400 Updated by: sniper@php.net Reported By: akukula at min dot pl -Status: Open +Status: Bogus Bug Type: *Programming Data Structures Operating System: Linux PHP Version: 4.3.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. This is definately not bug. Previous Comments: ------------------------------------------------------------------------ [2003-04-29 02:29:17] akukula at min dot pl 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 this bug report at http://bugs.php.net/?id=23400&edit=1

« previous php.bugs (#38742) next »