note 54503 added to function.min

From: Date: Wed, 06 Jul 2005 13:39:51 +0000
Subject: note 54503 added to function.min
Groups: php.notes 
Request: Send a blank email to php-notes+get-91533@lists.php.net to get a copy of this message
Here is my slightly modified version of the bugfree min-version. Now the max() function is no longer used in the modification and overall it's fasten up. Would be nice to get some feedback. <?php function min_mod () { $args = func_get_args(); if (!count($args)) return false; else { $min = false; foreach ($args AS $value) { $curval = floatval($value); if ($curval < $min || $min === false) $min = $curval; } } return $min; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.min.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54503 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54503&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54503&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54503&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54503&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54503&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54503&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54503&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91533) next »