#2965 [Com]: The <= operator does not work properly on characters.
| From: | pcgod at gmx dot net | Date: | Sun, 01 Dec 2002 02:36:25 +0000 |
| Subject: | #2965 [Com]: The <= operator does not work properly on characters. | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969350053@lists.php.net to get a copy of this message | ||
ID: 2965
Comment by: pcgod@gmx.net
Reported By: fred@webblake.com
Status: Closed
Bug Type: Documentation problem
Operating System: Redhat Linux 6.0
PHP Version: 4
Assigned To: hholzgra
New Comment:
even if this is the intended behaviour there is one problem left:
the loop stops at YZ and therefore you should assume that 'YZ' == 'Z'
but echo ('YZ' == 'Z'?1:0); returns 0
Previous Comments:
------------------------------------------------------------------------
[2002-11-30 10:22:44] pollita@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
PHP follows Perl convention when performing arithmetic operations on
character values. Explanation added in PHP-DOCs
------------------------------------------------------------------------
[2002-09-30 19:48:47] hholzgra@php.net
changed to documentation problem and reopened until verified
------------------------------------------------------------------------
[2002-09-30 16:49:59] hholzgra@php.net
it may look strange but it is intended behaviour
------------------------------------------------------------------------
[1999-12-13 10:09:12] fred@webblake.com
for($i = 'A'; $i <= 'Z' ; $i++)
echo "$i<br>\n";
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=2965&edit=1