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">
<p>PHP 提供了很多可用的标准函数,下表列出了常用的几个:</p>
<table><tbody><tr><th>函数</th><th>描述</th></tr><tr><td><ahref="https://www.runoob.com/php/php-boolval-function.html">boolval</a></td><td>获取变量的布尔值</td></tr><tr><td><ahref="https://www.runoob.com/php/php-debug_zval_dump-function.html">debug_zval_dump</a></td><td>查看一个变量在zend引擎中的引用计数、类型信息</td></tr><tr><td><ahref="https://www.runoob.com/php/php-floatval-function.html">doubleval</a></td><td>floatval 的别名</td></tr><tr><td><ahref="https://www.runoob.com/php/php-empty-function.html">empty</a></td><td>检查一个变量是否为空</td></tr><tr><td><ahref="https://www.runoob.com/php/php-floatval-function.html">floatval</a></td><td>获取变量的浮点值</td></tr><tr><td><ahref="https://www.runoob.com/php/php-get_defined_vars-function.html">get_defined_vars</a></td><td>返回由所有已定义变量所组成的数组</td></tr><tr><td><ahref="https://www.runoob.com/php/php-get_resource_type-function.html">get_resource_type</a></td><td>返回资源(resource)类型</td></tr><tr><td><ahref="https://www.runoob.com/php/php-gettype-function.html">gettype</a></td><td>获取变量的类型</td></tr><tr><td><ahref="https://www.runoob.com/php/php-import_request_variables-function.html">import_request_variables</a></td><td>将 GET/POST/Cookie 变量导入到全局作用域中</td></tr><tr><td><ahref="https://www.runoob.com/php/php-intval-function.html">intval</a></td><td>获取变量的整数值</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_array-function.html">is_array</a></td><td>检测变量是否是数组</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_bool-function.html">is_bool</a></td><td>检测变量是否是布尔型</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_callable-function.html">is_callable</a></td><td>检测参数是否为合法的可调用结构</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_float-function.html">is_double</a></td><td>is_float 的别名</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_float-function.html">is_float</a></td><td>检测变量是否是浮点型</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_int-function.html">is_int</a></td><td>检测变量是否是整数</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_int-function.html">is_integer</a></td><td>is_int 的别名</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_iterable-function.html">is_iterable</a></td><td>检测变量的内容是否是一个可迭代的值</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_int-function.html">is_long</a></td><td>is_int 的别名</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_null-function.html">is_null</a></td><td>检测变量是否为 NULL</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_numeric-function.html">is_numeric</a></td><td>检测变量是否为数字或数字字符串</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_object-function.html">is_object</a></td><td>检测变量是否是一个对象</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_float-function.html">is_real</a></td><td>is_float 的别名</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_resource-function.html">is_resource</a></td><td>检测变量是否为资源类型</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_scalar-function.html">is_scalar</a></td><td>检测变量是否是一个标量</td></tr><tr><td><ahref="https://www.runoob.com/php/php-is_string-function.html">is_string</a></td><td>检测变量是否是字符串</td></tr><tr><td><ahref="https://www.runoob.com/php/php-isset-function.html">isset</a></td><td>检测变量是否已设置并且非 NULL</td></tr><tr><td><ahref="https://www.runoob.com/php/php-print_r-function.html">print_r</a></td><td>打印变量,输出易于阅读的信息。</td></tr><tr><td><ahref="https://www.runoob.com/php/php-serialize-function.html">serialize</a></td><td>序列化对象</td></tr><tr><td><ahref="https://www.runoob.com/php/php-settype-function.html">settype</a></td><td>设置变量的类型</td></tr><tr><td><ahref="https://www.runoob.com/php/php-strval-function.html">strval</a></td><td>获取变量的字符串值</td></tr><tr><td><ahref="https://www.runoob.com/php/php-unserialize-function.html">unserialize</a></td><td>从已存储的表示中创建 PHP 的值</td></tr><tr><td><ahref="https://www.runoob.com/php/php-unset-function.html">unset</a></td><td>释放给定的变量</td></tr><tr><td><ahref="https://www.runoob.com/php/php-var_dump-function.html">var_dump</a></td><td>打印变量的相关信息</td></tr><tr><td><ahref="https://www.runoob.com/php/php-var_export-function.html">var_export</a></td><td>输出或返回一个变量,以字符串形式表示</td></tr></tbody></table>
<hr>
<h2 id="password_hash">密码散列算法</h2>
<table><tbody><tr><th>函数</th><th>描述</th></tr><tr><td><ahref="https://www.runoob.com/php/php-password_get_info.html">password_get_info</a></td><td>返回指定散列(hash)的相关信息</td></tr><tr><td><ahref="https://www.runoob.com/php/php-password_hash.html">password_hash</a></td><td>创建密码的散列(hash)</td></tr><tr><td><ahref="https://www.runoob.com/php/php-password_needs_rehash.html">password_needs_rehash</a></td><td>检测散列值是否匹配指定的选项</td></tr><tr><td><ahref="https://www.runoob.com/php/php-password_verify.html">password_verify</a></td><td>验证密码是否和散列值匹配</td></tr></tbody></table>
</div>
</div>
<div id="treeSkill"></div>
页:
[1]