|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-03-27 08:42 UTC] contact at jfsimon dot fr
Description: ------------ It would be really nice to add a 'ini_translate_shortand($shortand)' function as this is a real pain to exactly know how to do it. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
Admittedly, it's not trivial to port zend_atol()[1] to userland; you can get mostly away with using intval($foo, 0) and switching on the last character, but that doesn't cater to stuff like 128 (hey cool, I can leave a comment here!) M what is "perfectly" valid, and is parsed like 128M. In my opinion, this is a bug, but one that we can't easily fix for BC reasons. To cater to that you actually need regexps, so this feature request makes some sense. [1] <https://github.com/php/php-src/blob/php-7.4.23/Zend/zend_operators.c#L109-L134>