<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = 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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.ini-get.php',
    1 => 'ini_get',
    2 => 'Gets the value of a configuration option',
  ),
  'up' => 
  array (
    0 => 'ref.info.php',
    1 => 'PHP-Optionen-/-Informationen-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.ini-alter.php',
    1 => 'ini_alter',
  ),
  'next' => 
  array (
    0 => 'function.ini-get-all.php',
    1 => 'ini_get_all',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/info/functions/ini-get.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ini-get" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ini_get</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ini_get</span> &mdash; <span class="dc-title">Gets the value of a configuration option</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.ini-get-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ini_get</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$option</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Returns the value of the configuration option on success.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ini-get-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">option</code></dt>
     <dd>
      <p class="para">
       The configuration option name.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ini-get-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns the value of the configuration option as a string on success, or an
   empty string for <code class="literal">null</code> values. Returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the
   configuration option doesn&#039;t exist.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ini-get-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 A few <span class="function"><strong>ini_get()</strong></span> examples</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/*<br />Our php.ini contains the following settings:<br /><br />display_errors = On<br />opcache.enable_cli = Off<br />post_max_size = 8M<br />*/<br /><br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">'display_errors = ' </span><span style="color: #007700">. </span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'display_errors'</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'opcache.enable_cli = ' </span><span style="color: #007700">. (int) </span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'opcache.enable_cli'</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'post_max_size = ' </span><span style="color: #007700">. </span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'post_max_size'</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'post_max_size + 1 = ' </span><span style="color: #007700">. (</span><span style="color: #0000BB">rtrim</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'post_max_size'</span><span style="color: #007700">), </span><span style="color: #DD0000">'KMG'</span><span style="color: #007700">) + </span><span style="color: #0000BB">1</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'post_max_size in bytes = ' </span><span style="color: #007700">. </span><span style="color: #0000BB">ini_parse_quantity</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'post_max_size'</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">display_errors = 1
opcache.enable_cli = 0
post_max_size = 8M
post_max_size+1 = 9
post_max_size in bytes = 8388608</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.ini-get-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <strong>When querying boolean values</strong><br />
   <p class="para">
    A boolean ini value of <code class="literal">off</code> will be returned as an
    empty string or &quot;0&quot; while a boolean ini value of <code class="literal">on</code> will
    be returned as &quot;1&quot;.
    The function can also return the literal string of INI value.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <strong>When querying memory size values</strong><br />
   <p class="para">
    Many ini memory size values, such as
    <a href="ini.core.php#ini.upload-max-filesize" class="link">upload_max_filesize</a>, are
    stored in the <var class="filename">php.ini</var> file in shorthand notation.
    <span class="function"><strong>ini_get()</strong></span> will return the exact string stored in the
    <var class="filename">php.ini</var> file and <em>NOT</em> its <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
    equivalent.  Attempting normal arithmetic functions on these values
    will not have otherwise expected results.  The
    <span class="function"><a href="function.ini-parse-quantity.php" class="function">ini_parse_quantity()</a></span> function can be used to convert
    the shorthand notation into bytes.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    <span class="function"><strong>ini_get()</strong></span> can&#039;t read &quot;array&quot; ini options such as
    <code class="literal">pdo.dsn.<span class="replaceable">*</span></code>, and returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in this case.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ini-get-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.get-cfg-var.php" class="function" rel="rdfs-seeAlso">get_cfg_var()</a> - Liefert den Wert einer Konfigurationsoption</span></li>
    <li><span class="function"><a href="function.ini-get-all.php" class="function" rel="rdfs-seeAlso">ini_get_all()</a> - Gets all configuration options</span></li>
    <li><span class="function"><a href="function.ini-parse-quantity.php" class="function" rel="rdfs-seeAlso">ini_parse_quantity()</a> - Get interpreted size from ini shorthand syntax</span></li>
    <li><span class="function"><a href="function.ini-restore.php" class="function" rel="rdfs-seeAlso">ini_restore()</a> - Restores the value of a configuration option</span></li>
    <li><span class="function"><a href="function.ini-set.php" class="function" rel="rdfs-seeAlso">ini_set()</a> - Sets the value of a configuration option</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>