note 89586 added to function.ini-get

From: Date: Sun, 15 Mar 2009 10:20:34 +0000
Subject: note 89586 added to function.ini-get
Groups: php.notes 
Request: Send a blank email to php-notes+get-151960@lists.php.net to get a copy of this message
Here's a simplified version of return_bytes() that does not rely on non-breaking cases and variable variables. <?php function return_bytes($val) { $val = trim($val); $last = strtolower(substr($val, -1)); if($last == 'g') $val = $val*1024*1024*1024; if($last == 'm') $val = $val*1024*1024; if($last == 'k') $val = $val*1024; return $val; } ?> ---- Server IP: 216.235.13.26 Probable Submitter: 70.69.79.205 ---- Manual Page -- http://www.php.net/manual/en/function.ini-get.php Edit -- https://master.php.net/note/edit/89586 Del: integrated -- https://master.php.net/note/delete/89586/integrated Del: useless -- https://master.php.net/note/delete/89586/useless Del: bad code -- https://master.php.net/note/delete/89586/bad+code Del: spam -- https://master.php.net/note/delete/89586/spam Del: non-english -- https://master.php.net/note/delete/89586/non-english Del: in docs -- https://master.php.net/note/delete/89586/in+docs Del: other reasons-- https://master.php.net/note/delete/89586 Reject -- https://master.php.net/note/reject/89586 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151960) next »