you need more complex parser of limit as decribed in http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes