| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
Simple example of retrieving a numeric value with unit, such as memory_limit option :
$memory_limit = ini_get('memory_limit');
$memory_limit = intval($memory_limit) * match(substr($memory_limit, -1))
{
default => 1,
'K','k' => 1024,
'M','m' => 1024*1024,
'G','g' => 1024*1024*1024
};
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 2a01:e0a:4a0:ddf0:394d:3ff7:c156:8b87)
----
Manual Page -- https://php.net/manual/en/faq.using.php
Edit -- https://main.php.net/note/edit/130278
Del: integrated -- https://main.php.net/note/delete/130278/integrated
Del: useless -- https://main.php.net/note/delete/130278/useless
Del: bad code -- https://main.php.net/note/delete/130278/bad+code
Del: spam -- https://main.php.net/note/delete/130278/spam
Del: non-english -- https://main.php.net/note/delete/130278/non-english
Del: in docs -- https://main.php.net/note/delete/130278/in+docs
Del: other reasons-- https://main.php.net/note/delete/130278
Reject -- https://main.php.net/note/reject/130278
Search -- https://main.php.net/manage/user-notes.php