note 91941 added to function.min
| From: | Nitrogen at osu1 dot php dot net | Date: | Thu, 02 Jul 2009 12:26:50 +0000 |
| Subject: | note 91941 added to function.min | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157807@lists.php.net to get a copy of this message | ||
In response to Andrew, below..
This document also says "but still return the string if it's seen as the numerically
lowest value."
Whilst your example code compares two strings, the characters are the same until it reads
'0' and '2' at offset 6.. 0 is the minimum of the two of course, so it'll
return that string.
min() and max() can read mixed types, not just integers.
Thanks, Nitrogen.
----
Server IP: 69.147.83.197
Probable Submitter: 86.132.125.143
----
Manual Page -- http://www.php.net/manual/en/function.min.php
Edit -- https://master.php.net/note/edit/91941
Del: integrated -- https://master.php.net/note/delete/91941/integrated
Del: useless -- https://master.php.net/note/delete/91941/useless
Del: bad code -- https://master.php.net/note/delete/91941/bad+code
Del: spam -- https://master.php.net/note/delete/91941/spam
Del: non-english -- https://master.php.net/note/delete/91941/non-english
Del: in docs -- https://master.php.net/note/delete/91941/in+docs
Del: other reasons-- https://master.php.net/note/delete/91941
Reject -- https://master.php.net/note/reject/91941
Search -- https://master.php.net/manage/user-notes.php