note 27963 added to function.max
| From: | xs2jrr at xs4all dot nl | Date: | Fri, 27 Dec 2002 15:23:54 +0000 |
| Subject: | note 27963 added to function.max | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41349@lists.php.net to get a copy of this message | ||
What simon at esoft dot dk is saying is not true. max() accepts 3 types of arguments: int, float and
string. If none of the arguments has float as type, all arguments are converted to int. So
max(false, 0) is the same as max(0, 0), which ofcourse returns 0. 0 == false, so you might think it
is false. But 0 !== false, which means 0 is the maximal value of max(false, 0)!
--
http://www.php.net/manual/en/function.max.php
http://master.php.net/manage/user-notes.php?action=edit+27963
http://master.php.net/manage/user-notes.php?action=delete+27963
http://master.php.net/manage/user-notes.php?action=reject+27963