mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
change code, by Derick's suggestion
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@174867 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
48d09089f2
commit
d92412f24d
1 changed files with 8 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<!-- splitted from ./en/functions/info.xml, last change in rev 1.64 -->
|
||||
<refentry id="function.ini-get">
|
||||
<refnamediv>
|
||||
|
@ -62,19 +62,16 @@ function return_bytes($val) {
|
|||
$val = trim($val);
|
||||
$last = strtolower($val{strlen($val)-1});
|
||||
switch($last) {
|
||||
case 'k':
|
||||
return (int) $val * 1024;
|
||||
break;
|
||||
case 'm':
|
||||
return (int) $val * 1048576;
|
||||
break;
|
||||
// The 'G' modifier is available since PHP 5.1.0
|
||||
case 'g':
|
||||
return (int) $val * 1073741824;
|
||||
break;
|
||||
default:
|
||||
return $val;
|
||||
$val *= 1024;
|
||||
case 'm':
|
||||
$val *= 1024;
|
||||
case 'k':
|
||||
$val *= 1024;
|
||||
}
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue