<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.readline.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.readline-info.php',
    1 => 'readline_info',
    2 => '获取/设置各种 readline 内部变量',
  ),
  'up' => 
  array (
    0 => 'ref.readline.php',
    1 => 'Readline 函数',
  ),
  'prev' => 
  array (
    0 => 'function.readline-completion-function.php',
    1 => 'readline_completion_function',
  ),
  'next' => 
  array (
    0 => 'function.readline-list-history.php',
    1 => 'readline_list_history',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/readline/functions/readline-info.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.readline-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">readline_info</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">readline_info</span> &mdash; <span class="dc-title">获取/设置各种 readline 内部变量</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.readline-info-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>readline_info</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$var_name</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>|<span class="type"><a href="language.types.null.php" class="type null">null</a></span></span> <code class="parameter">$value</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <p class="simpara">
   获取/设置各种 readline 内部变量。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.readline-info-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">var_name</code></dt>
    <dd>
     <span class="simpara">
      变量名。
     </span>
    </dd>
   
   
    <dt><code class="parameter">value</code></dt>
    <dd>
     <span class="simpara">
      如果提供，将是设置的新值。
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.readline-info-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   如果调用时没有参数，此函数将返回 readline 使用的所有设置的值组成的数组。元素将按照以下值进行索引
   <code class="literal">done</code>、<code class="literal">end</code>、<code class="literal">erase_empty_line</code>、<code class="literal">library_version</code>、<code class="literal">line_buffer</code>、<code class="literal">mark</code>、<code class="literal">pending_input</code>、<code class="literal">point</code>、<code class="literal">prompt</code>、<code class="literal">readline_name</code>、和 <code class="literal">terminal_name</code>。
   <span class="type"><a href="language.types.array.php" class="type array">array</a></span> 仅包含库用于编译 readline 扩展支持的元素。
  </p>
  <p class="simpara">
   如果使用一个或两个参数调用，则返回原来的值。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.readline-info-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">var_name</code> 和 <code class="parameter">value</code> 现在可为 null。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


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