<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Gets all configuration options</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ini-alter.html">ini_alter</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ini-get.html">ini_get</a></div> <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.ini-get-all" class="refentry"> <div class="refnamediv"> <h1 class="refname">ini_get_all</h1> <p class="verinfo">(PHP 4 >= 4.2.0, PHP 5)</p><p class="refpurpose"><span class="refname">ini_get_all</span> — <span class="dc-title">Gets all configuration options</span></p> </div> <div class="refsect1 description" id="refsect1-function.ini-get-all-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>ini_get_all</strong></span> ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$extension</code></span> [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$details</code><span class="initializer"> = true</span></span> ]] )</div> <p class="para rdfs-comment"> Returns all the registered configuration options. </p> </div> <div class="refsect1 parameters" id="refsect1-function.ini-get-all-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">extension</code></em></span> <dd> <p class="para"> An optional extension name. If set, the function return only options specific for that extension. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">details</code></em></span> <dd> <p class="para"> Retrieve details settings or only the current value for each setting. Default is <strong><code>TRUE</code></strong> (retrieve details). </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.ini-get-all-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an associative array with directive name as the array key. </p> <p class="para"> When <em><code class="parameter">details</code></em> is <strong><code>TRUE</code></strong> (default) the array will contain <em>global_value</em> (set in <var class="filename">php.ini</var>), <em>local_value</em> (perhaps set with <span class="function"><a href="function.ini-set.html" class="function">ini_set()</a></span> or <var class="filename">.htaccess</var>), and <em>access</em> (the access level). </p> <p class="para"> When <em><code class="parameter">details</code></em> is <strong><code>FALSE</code></strong> the value will be the current value of the option. </p> <p class="para"> See the <a href="configuration.changes.modes.html" class="link">manual section</a> for information on what access levels mean. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> It's possible for a directive to have multiple access levels, which is why <em>access</em> shows the appropriate bitmask values. </p> </p></blockquote> </div> <div class="refsect1 changelog" id="refsect1-function.ini-get-all-changelog"> <h3 class="title">Changelog</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>5.3.0</td> <td> Added <em><code class="parameter">details</code></em>. </td> </tr> </tbody> </table> </p> </div> <div class="refsect1 examples" id="refsect1-function.ini-get-all-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-499"> <p><strong>Example #1 <span class="function"><strong>ini_get_all()</strong></span> examples</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"pcre"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Array ( [pcre.backtrack_limit] => Array ( [global_value] => 100000 [local_value] => 100000 [access] => 7 ) [pcre.recursion_limit] => Array ( [global_value] => 100000 [local_value] => 100000 [access] => 7 ) ) Array ( [allow_call_time_pass_reference] => Array ( [global_value] => 0 [local_value] => 0 [access] => 6 ) [allow_url_fopen] => Array ( [global_value] => 1 [local_value] => 1 [access] => 4 ) ... ) </pre></div> </div> </div> <div class="example" id="example-500"> <p><strong>Example #2 Disabling <em><code class="parameter">details</code></em></strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"pcre"</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Added in PHP 5.3.0<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">(</span><span style="color: #0000BB">null</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Added in PHP 5.3.0<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Array ( [pcre.backtrack_limit] => 100000 [pcre.recursion_limit] => 100000 ) Array ( [allow_call_time_pass_reference] => 0 [allow_url_fopen] => 1 ... ) </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-function.ini-get-all-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="configuration.changes.html" class="xref">How to change configuration settings</a></li> <li class="member"> <span class="function"><a href="function.ini-get.html" class="function" rel="rdfs-seeAlso">ini_get()</a> - Gets the value of a configuration option</span></li> <li class="member"> <span class="function"><a href="function.ini-restore.html" class="function" rel="rdfs-seeAlso">ini_restore()</a> - Restores the value of a configuration option</span></li> <li class="member"> <span class="function"><a href="function.ini-set.html" class="function" rel="rdfs-seeAlso">ini_set()</a> - Sets the value of a configuration option</span></li> <li class="member"> <span class="function"><a href="function.get-loaded-extensions.html" class="function" rel="rdfs-seeAlso">get_loaded_extensions()</a> - Returns an array with the names of all modules compiled and loaded</span></li> <li class="member"> <span class="function"><a href="function.phpinfo.html" class="function" rel="rdfs-seeAlso">phpinfo()</a> - Outputs information about PHP's configuration</span></li> <li class="member"> <span class="methodname"><a href="reflectionextension.getinientries.html" class="methodname" rel="rdfs-seeAlso">ReflectionExtension::getINIEntries()</a> - Gets extension ini entries</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ini-alter.html">ini_alter</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ini-get.html">ini_get</a></div> <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>