note 38340 deleted from function.max by danbrown
| From: | danbrown@php.net | Date: | Tue, 22 Mar 2011 14:02:07 +0000 |
| Subject: | note 38340 deleted from function.max by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178094@lists.php.net to get a copy of this message | ||
Note Submitter: nonick AT 8027 DOT org
----
If you are working with numbers, then you can use:
$a = ($b > $c) ? $b : $c;
which is somewhat faster (roughly 16%) than
$a = max($b, $c);
I tested this on several loops using integers and floats, over 1 million iterations.
I'm running PHP 4.3.1 as a module for Apache 1.3.27.