Source of: /manual/en/function.ini-get-all.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.ini-get-all.php',
1 => 'ini_get_all',
),
'up' =>
array (
0 => 'ref.info.php',
1 => 'PHP Options/Info Functions',
),
'prev' =>
array (
0 => 'function.ini-alter.php',
1 => 'ini_alter',
),
'next' =>
array (
0 => 'function.ini-get.php',
1 => 'ini_get',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<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>
<a name="function.ini-get-all.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">array</span> <span class="methodname"><b>ini_get_all</b></span>
([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$extension</tt></span>
[, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$details</tt><span class="initializer"> = true</span></span>
]] )</div>
<p class="para rdfs-comment">
Returns all the registered configuration options.
</p>
</div>
<a name="function.ini-get-all.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">extension</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
An optional extension name. If set, the function return only options
specific for that extension.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">details</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
Retrieve details settings or only the current value for each setting.
Default is <b><tt class="constant">TRUE</tt></b> (retrieve details).
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.ini-get-all.returnvalues"></a><div class="refsect1 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 <i><tt class="parameter">details</tt></i>
is <b><tt class="constant">TRUE</tt></b> (default) the array will
contain <i>global_value</i> (set in
<var class="filename">php.ini</var>), <i>local_value</i> (perhaps set with
<a href="function.ini-set.php" class="function">ini_set()</a> or <var class="filename">.htaccess</var>), and
<i>access</i> (the access level).
</p>
<p class="para">
When <i><tt class="parameter">details</tt></i>
is <b><tt class="constant">FALSE</tt></b> the value will be the
current value of the option.
</p>
<p class="para">
See the <a href="configuration.changes.modes.php" class="link">manual section</a>
for information on what access levels mean.
</p>
<blockquote><p><b class="note">Note</b>:
It's possible for a directive to have multiple access levels, which is
why <i>access</i> shows the appropriate bitmask values.
<br />
</p></blockquote>
</div>
<a name="function.ini-get-all.changelog"></a><div class="refsect1 changelog">
<h3 class="title">Changelog</h3>
<p class="para">
</p><table class="doctable informaltable">
<thead valign="middle">
<tr valign="middle">
<th>Version</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="middle" class="tbody">
<tr valign="middle">
<td align="left">5.3.0</td>
<td align="left">
Added <i><tt class="parameter">details</tt></i>
.
</td>
</tr>
</tbody>
</table>
<p>
</p>
</div>
<a name="function.ini-get-all.examples"></a><div class="refsect1 examples">
<h3 class="title">Examples</h3>
<p class="para">
</p><div class="example">
<p><b>Example #1 <b>ini_get_all()</b> examples</b></p>
<div class="example-contents programlisting">
<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 para"><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><p>
</p><div class="example">
<p><b>Example #2 Disabling <i><tt class="parameter">details</tt></i>
</b></p>
<div class="example-contents programlisting">
<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 para"><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>
</p>
</div>
<a name="function.ini-get-all.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="configuration.changes.php" class="xref">How to change configuration settings</a></li>
<li class="member"><a href="function.ini-get.php" class="function" rel="rdfs-seeAlso">ini_get()</a> - Gets the value of a configuration option</li>
<li class="member"><a href="function.ini-restore.php" class="function" rel="rdfs-seeAlso">ini_restore()</a> - Restores the value of a configuration option</li>
<li class="member"><a href="function.ini-set.php" class="function" rel="rdfs-seeAlso">ini_set()</a> - Sets the value of a configuration option</li>
<li class="member"><a href="function.get-loaded-extensions.php" class="function" rel="rdfs-seeAlso">get_loaded_extensions()</a> - Returns an array with the names of all modules compiled and loaded</li>
<li class="member"><a href="function.phpinfo.php" class="function" rel="rdfs-seeAlso">phpinfo()</a> - Outputs lots of PHP information</li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>