note 84207 added to function.min

From: Date: Thu, 03 Jul 2008 10:23:46 +0000
Subject: note 84207 added to function.min
Groups: php.notes 
Request: Send a blank email to php-notes+get-141108@lists.php.net to get a copy of this message
I've modified the bugfree min-version to ignore NULL values (else it returns 0). function min_mod () { $args = func_get_args(); if (!count($args[0])) return false; else { $min = false; foreach ($args[0] AS $value) { if (is_numeric($value)) { $curval = floatval($value); if ($curval < $min || $min === false) $min = $curval; } } } return $min; } ---- Server IP: 64.71.164.2 Probable Submitter: 212.55.40.1 ---- Manual Page -- http://www.php.net/manual/en/function.min.php Edit -- https://master.php.net/note/edit/84207 Del: integrated -- https://master.php.net/note/delete/84207/integrated Del: useless -- https://master.php.net/note/delete/84207/useless Del: bad code -- https://master.php.net/note/delete/84207/bad+code Del: spam -- https://master.php.net/note/delete/84207/spam Del: non-english -- https://master.php.net/note/delete/84207/non-english Del: in docs -- https://master.php.net/note/delete/84207/in+docs Del: other reasons-- https://master.php.net/note/delete/84207 Reject -- https://master.php.net/note/reject/84207 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#141108) next »