By admin |

php的一些其他常用函数

base64_decode — 对使用 MIME base64 编码的数据进行解码
base64_encode — 使用 MIME base64 对数据进行编码
get_headers — 取得服务器响应一个 HTTP 请求所发送的所有标头
get_meta_tags — 从一个文件中提取所有的 meta 标签 content 属性,返回一个数组
http_build_query — 生成 URL-encode 之后的请求字符串
parse_url — 解析 URL,返回其组成部分
rawurldecode — 对已编码的 URL 字符串进行解码
rawurlencode — 按照 RFC 1738 对 URL 进行编码
urldecode — 解码已编码的 URL 字符串
urlencode — 编码 URL 字符串
debug_zval_dump — Dumps a string representation of an internal zend value to output
doubleval — floatval() 的别名
empty — 检查一个变量是否为空
floatval — 获取变量的浮点值
get_defined_vars — 返回由所有已定义变量所组成的数组
get_resource_type — 返回资源(resource)类型
gettype — 获取变量的类型
import_request_variables — 将 GET/POST/Cookie 变量导入到全局作用域中
intval — 获取变量的整数值
is_array — 检测变量是否是数组
is_binary — Finds whether a variable is a native binary string
is_bool — 检测变量是否是布尔型
is_buffer — Finds whether a variable is a native unicode or binary string
is_callable — 检测参数是否为合法的可调用结构
is_double — is_float() 的别名
is_float — 检测变量是否是浮点型
is_int — 检测变量是否是整数
is_integer — is_int() 的别名
is_long — is_int() 的别名
is_null — 检测变量是否为 NULL
is_numeric — 检测变量是否为数字或数字字符串
is_object — 检测变量是否是一个对象
is_real — is_float() 的别名
is_resource — 检测变量是否为资源类型
is_scalar — 检测变量是否是一个标量
is_string — 检测变量是否是字符串
is_unicode — Finds whether a variable is a unicode string
isset — 检测变量是否设置
print_r — 打印关于变量的易于理解的信息。
serialize — 产生一个可存储的值的表示
settype — 设置变量的类型
strval — 获取变量的字符串值
unserialize — 从已存储的表示中创建 PHP 的值
unset — 释放给定的变量
var_dump — 打印变量的相关信息
var_export — 输出或返回一个变量的字符串表示