php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64530 Missing function to translate shorthand notation to bytes
Submitted: 2013-03-27 08:42 UTC Modified: 2013-03-27 08:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: contact at jfsimon dot fr Assigned:
Status: Open Package: *General Issues
PHP Version: 5.3.23 OS:
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-27 08:46 UTC] contact at jfsimon dot fr
This took me 4 days and 3 PRs to correctly add this method in Symfony.
https://github.com/symfony/symfony/pull/7456
https://github.com/symfony/symfony/pull/7481
https://github.com/symfony/symfony/pull/7489
 [2013-03-27 08:59 UTC] victor at suumit dot com
'ini_translate_shortand($shorthand)' should translate a shorthand notation to its 
integer counterpart.

This is useful as the process is not as simple as described in the doc @ 
http://www.php.net/manual/en/function.ini-get.php - the doc needs either to be 
fixed or at least a warning should be added as not all formats are supported by 
the given conversion method.

The method described in the doc is wrong as octal and hexadecimal values are 
supported in the shorthand notation (008, 0x10M, ...)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 09:02:23 2014 UTC