Doc #68292 [NEW]: shorthand notation can be used in ini_set
From: humbads at alum dot mit dot edu
Operating system: n/a
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:shorthand notation can be used in ini_set
Description:
------------
In the PHP FAQ #16 for shorthand notation, it says:
"You may not use these shorthand notations outside of php.ini, instead
use an integer value of bytes."
http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes
However, this contradicts the fact that you can use shorthand notation
in the ini_set function. See the attached test script.
The documentation should be updated to clarify that shorthand notation
can be used both in the php.ini and ini_set function. If ini_set
shorthand support was added later, it should identify the PHP version in
which it was added.
Test script:
---------------
php -r
'var_dump(ini_set("memory_limit","123M"));var_dump(ini_get("memory_limit"));'
Expected result:
----------------
If ini_set could not take shorthand notation, then it would return
false, and the call to ini_get would return the original memory limit
(of '64M').
Actual result:
--------------
string(3) "64M"
string(4) "123M"
--
Edit bug report at https://bugs.php.net/bug.php?id=68292&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68292&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68292&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68292&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68292&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68292&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68292&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68292&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68292&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68292&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68292&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68292&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68292&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68292&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68292&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68292&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68292&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68292&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68292&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68292&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68292&r=mysqlcfg
Thread (4 messages)
- humbads at alum dot mit dot edu