note 38340 added to function.max

From: Date: Wed, 17 Dec 2003 12:50:28 +0000
Subject: note 38340 added to function.max
Groups: php.notes 
Request: Send a blank email to php-notes+get-62112@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.max.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38340 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38340&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38340&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62112) next »