From f5de7481b289b488a962ebf62e115e6d4b9091e6 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 4 Aug 2004 05:23:47 +0000 Subject: [PATCH] Show how to display shorthand notation as bytes as this is how the php source does it. And make the example formal. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165192 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/info/functions/ini-get.xml | 46 ++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/reference/info/functions/ini-get.xml b/reference/info/functions/ini-get.xml index 23521f2ac9..55119c382d 100644 --- a/reference/info/functions/ini-get.xml +++ b/reference/info/functions/ini-get.xml @@ -1,5 +1,5 @@ - + @@ -27,13 +27,21 @@ When querying memory size values - Many ini memory size values, such as upload_max_filesize - are stored in the &php.ini; file in shorthand notation. ini_get - will return the exact string stored in the &php.ini; file, NOT - its integer equivalent. Attempting normal arithmetic functions on these values - will not have otherwise expected results. - - + Many ini memory size values, such as + upload_max_filesize, are + stored in the &php.ini; file in shorthand notation. + ini_get will return the exact string stored in the + &php.ini; file and NOT its integer + equivalent. Attempting normal arithmetic functions on these values + will not have otherwise expected results. The example below shows one + way to convert shorthand notation into bytes, much like how the PHP + source does it. + + + + + A few <function>ini_get</function> examples + ]]> @@ -62,12 +88,12 @@ display_errors = 1 register_globals = 0 post_max_size = 8M post_max_size+1 = 9 +post_max_size in bytes = 8388608 ]]> - + - See also get_cfg_var,