#23246 [Opn->Bgs]: == operator

From: Date: Wed, 16 Apr 2003 20:09:11 +0000
Subject: #23246 [Opn->Bgs]: == operator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37771@lists.php.net to get a copy of this message
ID: 23246 Updated by: helly@php.net Reported By: tdietrich at sst dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Solaris PHP Version: 4.3.0 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 Octal notation is marked by a leading 0: marcus@zaphod /usr/src/php5 $ php -r 'echo (08)."\n";' 0 marcus@zaphod /usr/src/php5 $ php -r 'echo (07)."\n";' 7 marcus@zaphod /usr/src/php5 $ php -r 'echo (010)."\n";' 8 Previous Comments: ------------------------------------------------------------------------ [2003-04-16 14:51:54] tdietrich at sst dot com echo '8'. ((08 == 8) ? 'true':'false')."<br>\n"; echo '2'. ((02 == 2) ? 'true':'false')."<br>\n"; the first line returns false, but the 2nd line returns true. This will return true for any number less than 8. possibly has to do with the two byte conversion... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23246&edit=1

« previous php.bugs (#37771) next »