note 32025 deleted from function.max by danbrown
| From: | danbrown@php.net | Date: | Tue, 22 Mar 2011 14:02:02 +0000 |
| Subject: | note 32025 deleted from function.max by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178093@lists.php.net to get a copy of this message | ||
Note Submitter: mikhail_kovalev at mail dot ru
----
Note that in version 4.0.3 (the only version I tested):
max (0, 0); // returns 0.
max (0, false); // returns 0.
max (false, 0); // returns false.
max (false, false); // returns false.
As a solution use this:
(int) max (false, 0); // returns 0.
(int) max (false, false); // returns 0.