Doc #68292 [Opn->Ver]: shorthand notation can be used in ini_set

From: Date: Tue, 19 May 2015 13:09:56 +0000
Subject: Doc #68292 [Opn->Ver]: shorthand notation can be used in ini_set
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12345@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68292&edit=1 ID: 68292 Updated by: cmb@php.net Reported by: humbads at alum dot mit dot edu Summary: shorthand notation can be used in ini_set -Status: Open +Status: Verified Type: Documentation Problem Package: Documentation problem Operating System: n/a PHP Version: Irrelevant Block user comment: N Private report: N New Comment: See also <http://3v4l.org/lHP3b>. Previous Comments: ------------------------------------------------------------------------ [2014-10-23 15:23:33] humbads at alum dot mit dot edu 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 this bug report at https://bugs.php.net/bug.php?id=68292&edit=1

« previous php.doc.bugs (#12345) next »