note 40529 added to function.max
| From: | j dot gizmo at aon dot at | Date: | Sat, 06 Mar 2004 19:37:25 +0000 |
| Subject: | note 40529 added to function.max | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66353@lists.php.net to get a copy of this message | ||
regarding that "n/a" stuff, and that with the zerofilled fields, i think that:
when comparing integers with integers, the behaviour is clear.
when comparing integers and strings, the string is cast to an integer.
but when comparing strings with other strings, a string comparison is used. (strings are ordered
like in a dictionary)
eg:
"a"<"b"
"aaa"<"aab"
"aa"<"b"
this explains why "5"<"n/a" (ascii value of "5" is lower than that
of "n") and why "50"<"8" (ascii of "5" vs. "8")
----
Manual Page -- http://www.php.net/manual/en/function.max.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40529
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40529&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40529&report=yes
Search -- http://master.php.net/manage/user-notes.php