admin 发表于 2023-2-16 18:54:43

PHP 杂项 函数

<div id="article_content" class="article_content clearfix">
      <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/kdoc_html_views-1a98987dfd.css">
      <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-6e43165c0a.css">
                <div id="content_views" class="htmledit_views">
                  <h2>PHP 杂项函数简介</h2>
<p>我们把不属于其他类别的函数归纳到杂项函数类别。</p>
<hr>
<h2>安装</h2>
<p>杂项函数是 PHP 核心的组成部分。无需安装即可使用这些函数。</p>
<hr>
<h2>Runtime 配置</h2>
<p>杂项函数的行为受 php.ini 文件中的设置的影响。</p>
<p>杂项配置选项&#xff1a;</p>
<table><tbody><tr><th>名称</th><th>默认</th><th>描述</th><th>可更改</th></tr><tr><td>ignore_user_abort</td><td>&#34;0&#34;</td><td>FALSE 指示只要脚本在客户机终止连接后尝试进行输出&#xff0c;脚本将被终止。</td><td>PHP_INI_ALL</td></tr><tr><td>highlight.string</td><td>&#34;#DD0000&#34;</td><td>供突出显示符合 PHP 语法的字符串而使用的颜色。</td><td>PHP_INI_ALL</td></tr><tr><td>highlight.comment</td><td>&#34;#FF8000&#34;</td><td>供突出显示 PHP 注释而使用的颜色。</td><td>PHP_INI_ALL</td></tr><tr><td>highlight.keyword</td><td>&#34;#007700&#34;</td><td>供语法高亮显示 PHP 关键词而使用的颜色&#xff08;比如圆括号和分号&#xff09;。</td><td>PHP_INI_ALL</td></tr><tr><td>highlight.bg</td><td>&#34;#FFFFFF&#34;</td><td>背景颜色。</td><td>PHP_INI_ALL</td></tr><tr><td>highlight.default</td><td>&#34;#0000BB&#34;</td><td>PHP 语法的默认颜色。</td><td>PHP_INI_ALL</td></tr><tr><td>highlight.html</td><td>&#34;#000000&#34;</td><td>HTML 代码的颜色。</td><td>PHP_INI_ALL</td></tr><tr><td>browscap</td><td>NULL</td><td>浏览器性能文件&#xff08;例如&#xff1a;browscap.ini&#xff09;的名称和位置。</td><td>PHP_INI_SYSTEM</td></tr></tbody></table>
<p></p>
<hr>
<h2>PHP 杂项函数</h2>
<p><strong>PHP</strong>&#xff1a;指示支持该函数的最早的 PHP 版本。</p>
<table><tbody><tr><th>函数</th><th>描述</th><th>PHP</th></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-connection-aborted.html">connection_aborted()</a></td><td>检查是否断开客户机。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-connection-status.html">connection_status()</a></td><td>返回当前的连接状态。</td><td>3</td></tr><tr><td>connection_timeout()</td><td>在 PHP 4.0.5 中不赞成使用。检查脚本是否超时。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-constant.html">constant()</a></td><td>返回一个常量的值。</td><td>4</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-define.html">define()</a></td><td>定义一个常量。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-defined.html">defined()</a></td><td>检查某常量是否存在。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-die.html">die()</a></td><td>输出一条消息&#xff0c;并退出当前脚本。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-eval.html">eval()</a></td><td>把字符串当成 PHP 代码来计算。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-exit.html">exit()</a></td><td>输出一条消息&#xff0c;并退出当前脚本。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-get-browser.html">get_browser()</a></td><td>返回用户浏览器的性能。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-highlight-file.html">highlight_file()</a></td><td>对文件进行 PHP 语法高亮显示。</td><td>4</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-highlight-string.html">highlight_string()</a></td><td>对字符串进行 PHP 语法高亮显示。</td><td>4</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-ignore-user-abort.html">ignore_user_abort()</a></td><td>设置与远程客户机断开是否会终止脚本的执行。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-pack.html">pack()</a></td><td>把数据装入一个二进制字符串。</td><td>3</td></tr><tr><td>php_check_syntax()</td><td>在 PHP 5.0.5 中不赞成使用。</td><td>5</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-strip-whitespace.html">php_strip_whitespace()</a></td><td>返回已删除 PHP 注释以及空白字符的源代码文件。</td><td>5</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-show-source.html">show_source()</a></td><td>highlight_file() 的别名。</td><td>4</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-sleep.html">sleep()</a></td><td>延迟代码执行若干秒。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-time-nanosleep.html">time_nanosleep()</a></td><td>延迟代码执行若干秒和纳秒。</td><td>5</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-time-sleep-until.html">time_sleep_until()</a></td><td>延迟代码执行直到指定的时间。</td><td>5</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-uniqid.html">uniqid()</a></td><td>生成唯一的 ID。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-unpack.html">unpack()</a></td><td>从二进制字符串对数据进行解包。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-misc-usleep.html">usleep()</a></td><td>延迟代码执行若干微秒。</td><td>3</td></tr></tbody></table>
<p></p>
<hr>
<h2>PHP 杂项常量</h2>
<p><strong>PHP</strong>&#xff1a;指示支持该常量的最早的 PHP 版本。</p>
<table><tbody><tr><th>常量</th><th>描述</th><th>PHP</th></tr><tr><td>CONNECTION_ABORTED</td><td></td><td></td></tr><tr><td>CONNECTION_NORMAL</td><td></td><td></td></tr><tr><td>CONNECTION_TIMEOUT</td><td></td><td></td></tr><tr><td>__COMPILER_HALT_OFFSET__</td></tr></tbody></table>
                </div>
      </div>
      <div id="treeSkill"></div>
页: [1]
查看完整版本: PHP 杂项 函数