PHP基本常用函数

数组函数 (数组的本质是储存,管理和操作一组变量)

array_change_key_case -- 返回字符串键名全为小写或大写的数组

array_chunk -- 将一个数组分割成多个

array_combine --  创建一个数组,用一个数组的值作为其键名,另一个数组的值作为其值

array_count_values -- 统计数组中所有的值出现的次数

array_diff_assoc -- 带索引检查计算数组的差集

array_diff_uassoc --  Computes the difference of arrays with additional index check which is performed by a user supplied callback function

array_diff -- 计算数组的差集

array_fill -- 用给定的值填充数组

array_filter --  用回调函数过滤数组中的单元

array_flip -- 交换数组中的键和值

array_intersect_assoc -- 带索引检查计算数组的交集

array_intersect -- 计算数组的交集

array_key_exists -- 检查给定的键名或索引是否存在于数组中

array_keys -- 返回数组中所有的键名

array_map --  将回调函数作用到给定数组的单元上

array_merge_recursive -- 递归地合并两个或多个数组

array_merge -- 合并两个或多个数组

array_multisort -- 对多个数组或多维数组进行排序

array_pad --  用值将数组填补到指定长度

array_pop -- 将数组最后一个单元弹出(出栈)

array_push --  将一个或多个单元压入数组的末尾(入栈)

array_rand --  从数组中随机取出一个或多个单元

array_reduce --  用回调函数迭代地将数组简化为单一的值

array_reverse --  返回一个单元顺序相反的数组

array_search --  在数组中搜索给定的值,如果成功则返回相应的键名

array_shift --  将数组开头的单元移出数组

array_slice -- 从数组中取出一段

array_splice --  把数组中的一部分去掉并用其它值取代

array_sum --  计算数组中所有值的和

array_udiff_assoc -- Computes the difference of arrays with additional index check. The data is compared by using a callback function.

array_udiff_uassoc -- Computes the difference of arrays with additional index check. The data is compared by using a callback function. The index check is done by a callback function also

array_udiff -- Computes the difference of arrays by using a callback function for data comparison.

array_unique -- 移除数组中重复的值

array_unshift --  在数组开头插入一个或多个单元

array_values -- 返回数组中所有的值

array_walk_recursive --  Apply a user function recursively to every member of an array

array_walk --  对数组中的每个成员应用用户函数

array --  新建一个数组

arsort --  对数组进行逆向排序并保持索引关系

asort -- 对数组进行排序并保持索引关系

compact --  建立一个数组,包括变量名和它们的值

count -- 统计变量中的单元数目

current -- 返回数组中的当前单元

each --  返回数组中当前的键/值对并将数组指针向前移动一步

end --  将数组的内部指针指向最后一个单元

extract --  从数组中将变量导入到当前的符号表

in_array -- 检查数组中是否存在某个值

key -- 从结合数组中取得键名

krsort -- 对数组按照键名逆向排序

ksort -- 对数组按照键名排序

list --  把数组中的值赋给一些变量

natcasesort --  用“自然排序”算法对数组进行不区分大小写字母的排序

natsort --  用“自然排序”算法对数组排序

next --  将数组中的内部指针向前移动一位

pos -- 得到数组当前的单元

prev -- 将数组的内部指针倒回一位

range --  建立一个包含指定范围单元的数组

reset --  将数组的内部指针指向第一个单元

rsort -- 对数组逆向排序

shuffle -- 将数组打乱

sizeof -- count() 的别名

sort -- 对数组排序

uasort --  使用用户自定义的比较函数对数组中的值进行排序并保持索引关联

uksort --  使用用户自定义的比较函数对数组中的键名进行排序

usort --  使用用户自定义的比较函数对数组中的值进行排序

 

.Aspell 函数

aspell_check_raw --  Check a word without changing its case or trying to trim it [deprecated]

aspell_check -- Check a word [deprecated]

aspell_new -- Load a new dictionary [deprecated]

aspell_suggest -- Suggest spellings of a word [deprecated]

 

Calendar Functions

cal_days_in_month -- Return the number of days in a month for a given year and calendar

cal_from_jd -- Converts from Julian Day Count to a supported calendar

cal_info -- Returns information about a particular calendar

cal_to_jd -- Converts from a supported calendar to Julian Day Count

easter_date --  Get Unix timestamp for midnight on Easter of a given year

easter_days --  Get number of days after March 21 on which Easter falls for a given year

FrenchToJD --  Converts a date from the French Republican Calendar to a Julian Day Count

GregorianToJD --  Converts a Gregorian date to Julian Day Count

JDDayOfWeek -- Returns the day of the week

JDMonthName -- Returns a month name

JDToFrench --  Converts a Julian Day Count to the French Republican Calendar

JDToGregorian -- Converts Julian Day Count to Gregorian date

jdtojewish --  Converts a Julian day count to a Jewish calendar date

JDToJulian --  Converts a Julian Day Count to a Julian Calendar Date

jdtounix -- Convert Julian Day to Unix timestamp

JewishToJD --  Converts a date in the Jewish Calendar to Julian Day Count

JulianToJD --  Converts a Julian Calendar date to Julian Day Count

unixtojd -- Convert Unix timestamp to Julian Day

 

Windows 的 COM 支持函数库

COM -- COM 类

DOTNET -- DOTNET class

VARIANT -- VARIANT 类

com_addref --  增加组件引用计数。

com_create_guid --  Generate a globally unique identifier (GUID)

com_event_sink --  Connect events from a COM object to aPHP object

com_get_active_object --  Returns a handle to an already running instance of a COM object

com_get --  获取 COM 组件的属性值

com_invoke --  调用 COM 组件的方法。

com_isenum -- 获取一个 IEnumVariant

com_load_typelib -- 装载一个 Typelib

com_load --  创建新的 COM 组件的引用

com_message_pump --  Process COM messages, sleeping for up to timeoutms milliseconds

com_print_typeinfo --  Print out a PHP class definition for a dispatchable interface

com_propget -- com_get() 的别名

com_propput -- com_set() 的别名

com_propset -- com_set() 的别名

com_release --  减少组件引用计数。

com_set --  给 COM 组件的属性赋值

variant_abs --  Returns the absolute value of a variant

variant_add --  "Adds" two variant values together and returns the result

variant_and --  performs a bitwise AND operation between two variants and returns the result

variant_cast --  Convert a variant into a new variant object of another type

variant_cat --  concatenates two variant values together and returns the result

variant_cmp --  Compares two variants

variant_date_from_timestamp --  Returns a variant date representation of a unix timestamp

variant_date_to_timestamp --  Converts a variant date/time value to unix timestamp

variant_div --  Returns the result from dividing two variants

variant_eqv --  Performs a bitwise equivalence on two variants

variant_fix --  Returns the integer portion ? of a variant

variant_get_type -- Returns the type of a variant object

variant_idiv --  Converts variants to integers and then returns the result from dividing them

variant_imp --  Performs a bitwise implication on two variants

variant_int --  Returns the integer portion of a variant

variant_mod --  Divides two variants and returns only the remainder

variant_mul --  multiplies the values of the two variants and returns the result

variant_neg --  Performs logical negation on a variant

variant_not --  Performs bitwise not negation on a variant

variant_or --  Performs a logical disjunction on two variants

variant_pow --  Returns the result of performing the power function with two variants

variant_round --  Rounds a variant to the specified number of decimal places

variant_set_type --  Convert a variant into another type. Variant is modified "in-place"

variant_set --  Assigns a new value for a variant object

variant_sub --  subtracts the value of the right variant from the left variant value and returns the result

variant_xor --  Performs a logical exclusion on two variants

 

类/对象函数库

call_user_method_array --  调用一个用户方法,同时传递参数数组[已停用]

call_user_method --  调用特定对象的用户方法[已停用]

class_exists -- 检查类是否已定义

get_class_methods -- 返回由类的方法名组成的数组

get_class_vars --  返回由类的默认属性组成的数组

get_class -- 返回对象的类名

get_declared_classes -- 返回由已定义类的名字所组成的数组

get_declared_interfaces --  Returns an array of all declared interfaces.

get_object_vars -- 返回由对象属性组成的关联数组

get_parent_class -- 返回对象或类的父类名

is_a --  如果对象属于该类或该类是此对象的父类则返回 TRUE

is_subclass_of --  如果此对象是该类的子类,则返回 TRUE

method_exists -- 检查类的方法是否存在

 

时间日期函数库

checkdate -- 验证一个格里高里日期

date -- 格式化一个本地时间/日期

getdate -- 取得日期/时间信息

gettimeofday -- 取得当前时间

gmdate -- 格式化一个 GMT/UTC 日期/时间

gmmktime -- 取得 GMT 日期的 UNIX 时间戳

gmstrftime --  根据区域设置格式化 GMT/UTC 时间/日期

idate --  Format a local time/date as integer

localtime -- 取得本地时间

microtime --  返回当前 UNIX 时间戳和微秒数

mktime -- 取得一个日期的 UNIX 时间戳

strftime --  根据区域设置格式化本地时间/日期

strtotime --  将任何英文文本的日期时间描述解析为 UNIX 时间戳

time -- 返回当前的 UNIX 时间戳

 

目录函数库

chdir -- 改变目录

chroot -- 改变根目录

dir -- directory 类

closedir -- 关闭目录句柄

getcwd -- 取得当前工作目录

opendir -- 打开目录句柄

readdir -- 从目录句柄中读取条目

rewinddir -- 倒回目录句柄

scandir --  列出指定路径中的文件和目录

 

文件系统函数库

basename -- 返回路径中的文件名部分

chgrp -- 改变文件所属的组

chmod -- 改变文件模式

chown -- 改变文件的所有者

clearstatcache -- 清除文件状态缓存

copy -- 拷贝文件

delete -- 参见 unlink() 或 unset()

dirname -- 返回路径中的目录部分

disk_free_space -- 返回目录中的可用空间

disk_total_space -- 返回一个目录的磁盘总大小

diskfreespace -- disk_free_space() 函数的别名

fclose -- 关闭一个已打开的文件指针

feof -- 测试文件指针是否到了文件结束的位置

fflush -- 将缓冲内容输出到文件

fgetc -- 从文件指针中读取字符

fgetcsv -- 从文件指针中读入一行并解析 CSV 字段

fgets -- 从文件指针中读取一行

fgetss -- 从文件指针中读取一行并过滤掉 HTML 标记

file_exists -- 检查文件或目录是否存在

file_get_contents -- 将整个文件读入一个字符串

file_put_contents -- 将一个字符串写入文件

file -- 把整个文件读入一个数组中

fileatime -- 取得文件的上次访问时间

filectime -- 取得文件的 inode 修改时间

filegroup -- 取得文件的组

fileinode -- 取得文件的 inode

filemtime -- 取得文件修改时间

fileowner -- 取得文件的所有者

fileperms -- 取得文件的权限

filesize -- 取得文件大小

filetype -- 取得文件类型

flock -- 轻便的咨询文件锁定

fnmatch -- 用模式匹配文件名

fopen -- 打开文件或者 URL

fpassthru -- 输出文件指针处的所有剩余数据

fputs -- fwrite() 的别名

fread -- 读取文件(可安全用于二进制文件)

fscanf -- 从文件中格式化输入

fseek -- 在文件指针中定位

fstat -- 通过已打开的文件指针取得文件信息

ftell -- 返回文件指针读/写的位置

ftruncate -- 将文件截断到给定的长度

fwrite -- 写入文件(可安全用于二进制文件)

glob -- 寻找与模式匹配的文件路径

is_dir -- 判断给定文件名是否是一个目录

is_executable -- 判断给定文件名是否可执行

is_file -- 判断给定文件名是否为一个正常的文件

is_link -- 判断给定文件名是否为一个符号连接

is_readable -- 判断给定文件名是否可读

is_uploaded_file -- 判断文件是否是通过 HTTP POST 上传的

is_writable -- 判断给定的文件名是否可写

is_writeable -- is_writable() 的别名

link -- 建立一个硬连接

linkinfo -- 获取一个连接的信息

lstat -- 给出一个文件或符号连接的信息

mkdir -- 新建目录

move_uploaded_file -- 将上传的文件移动到新位置

parse_ini_file -- 解析一个配置文件

pathinfo -- 返回文件路径的信息

pclose -- 关闭进程文件指针

popen -- 打开进程文件指针

readfile -- 输出一个文件

readlink -- 返回符号连接指向的目标

realpath -- 返回规范化的绝对路径名

rename -- 文件重命名

rewind -- 倒回文件指针的位置

rmdir -- 删除目录

set_file_buffer -- stream_set_write_buffer() 的别名

stat -- 给出文件的信息

symlink -- 建立符号连接

tempnam -- 建立一个具有唯一文件名的文件

tmpfile -- 建立一个临时文件

touch -- 设定文件的访问和修改时间

umask -- 改变当前的 umask

unlink -- 删除文件

 

FTP 函数库

ftp_alloc -- Allocates space for a file to be uploaded.

ftp_cdup -- 切换到当前目录的父目录

ftp_chdir -- 在 FTP 服务器上切换当前目录

ftp_chmod -- Set permissions on a file via FTP

ftp_close -- 关闭一个活动的 FTP 连接

ftp_connect -- 建立一个新的 FTP 连接

ftp_delete -- 删除 FTP 服务器上的一个文件

ftp_exec -- 请求运行一条 FTP 命令

ftp_fget -- 从 FTP 服务器上下载一个文件并保存到本地一个已经打开的文件中

ftp_fput -- 上传一个已经打开的文件到 FTP 服务器

ftp_get_option -- 返回当前 FTP 连接的各种不同的选项设置

ftp_get -- 从 FTP 服务器上下载一个文件

ftp_login -- 登录 FTP 服务器

ftp_mdtm -- 返回指定文件的最后修改时间

ftp_mkdir -- 建立新目录

ftp_nb_continue -- 连续获取/发送文件(non-blocking)

ftp_nb_fget -- Retrieves a file from the FTP server and writes it to an open file (non-blocking)

ftp_nb_fput -- Stores a file from an open file to the FTP server (non-blocking)

ftp_nb_get -- 从 FTP 服务器上获取文件并写入本地文件(non-blocking)

ftp_nb_put -- 存储一个文件至 FTP 服务器(non-blocking)

ftp_nlist -- 返回给定目录的文件列表

ftp_pasv -- 返回当前 FTP 被动模式是否打开

ftp_put -- 上传文件到 FTP 服务器

ftp_pwd -- 返回当前目录名

ftp_quit -- ftp_close() 的别名

ftp_raw -- Sends an arbitrary command to an FTP server

ftp_rawlist -- 返回指定目录下文件的详细列表

ftp_rename -- 更改 FTP 服务器上指定的文件名

ftp_rmdir -- 删除一个目录

ftp_set_option -- 设置各种 FTP 运行时选项

ftp_site -- 向服务器发送 SITE 命令

ftp_size -- 返回指定文件的大小

ftp_ssl_connect -- Opens an Secure SSL-FTP connection

ftp_systype -- 返回远程 FTP 服务器的系统类型

 

HTTP 相关函数库

header -- Send a raw HTTP header

headers_list -- Returns a list of response headers sent (or ready to send)

headers_sent -- Checks if or where headers have been sent

setcookie -- Send a cookie

setrawcookie -- Send a cookie without urlencoding the cookie value

 

图像函数库

exif_imagetype -- 判断一个图像的类型

exif_read_data --  从 JPEG 或 TIFF 文件中读取 EXIF 头信息,这样就可以读取数码相机产生的元数据

exif_thumbnail -- 取得嵌入在 TIFF 或 JPEG 图像中的缩略图

gd_info -- 取得当前安装的 GD 库的信息

getimagesize -- 取得图像大小

image_type_to_extension --  Get file extension for image type

image_type_to_mime_type --  取得 getimagesize,exif_read_data,exif_thumbnail,exif_imagetype 所返回的图像类型的 MIME 类型

image2wbmp -- 以 WBMP 格式将图像输出到浏览器或文件

imagealphablending -- 设定图像的混色模式

imageantialias -- 是否使用 antialias 功能

imagearc -- 画椭圆弧

imagechar -- 水平地画一个字符

imagecharup -- 垂直地画一个字符

imagecolorallocate -- 为一幅图像分配颜色

imagecolorallocatealpha -- 为一幅图像分配颜色 + alpha

imagecolorat -- 取得某像素的颜色索引值

imagecolorclosest -- 取得与指定的颜色最接近的颜色的索引值

imagecolorclosestalpha -- 取得与指定的颜色 + alpha 最接近的颜色

imagecolorclosesthwb --  取得与给定颜色最接近的色度的黑白色的索引

imagecolordeallocate -- 取消图像颜色的分配

imagecolorexact -- 取得指定颜色的索引值

imagecolorexactalpha -- 取得指定的颜色 + alpha 的索引值

imagecolormatch --  使一个图像中调色板版本的颜色与真彩色版本更能匹配

imagecolorresolve --  取得指定颜色的索引值或有可能得到的最接近的替代值

imagecolorresolvealpha --  取得指定颜色 + alpha 的索引值或有可能得到的最接近的替代值

imagecolorset -- 给指定调色板索引设定颜色

imagecolorsforindex -- 取得某索引的颜色

imagecolorstotal -- 取得一幅图像的调色板中颜色的数目

imagecolortransparent -- 将某个颜色定义为透明色

imagecopy -- 拷贝图像的一部分

imagecopymerge -- 拷贝并合并图像的一部分

imagecopymergegray -- 用灰度拷贝并合并图像的一部分

imagecopyresampled -- 重采样拷贝部分图像并调整大小

imagecopyresized -- 拷贝部分图像并调整大小

imagecreate -- 新建一个基于调色板的图像

imagecreatefromgd2 -- 从 GD2 文件或 URL 新建一图像

imagecreatefromgd2part -- 从给定的 GD2 文件或 URL 中的部分新建一图像

imagecreatefromgd -- 从 GD 文件或 URL 新建一图像

imagecreatefromgif -- 从 GIF 文件或 URL 新建一图像

imagecreatefromjpeg -- 从 JPEG 文件或 URL 新建一图像

imagecreatefrompng -- 从 PNG 文件或 URL 新建一图像

imagecreatefromstring -- 从字符串中的图像流新建一图像

imagecreatefromwbmp -- 从 WBMP 文件或 URL 新建一图像

imagecreatefromxbm -- 从 XBM 文件或 URL 新建一图像

imagecreatefromxpm -- 从 XPM 文件或 URL 新建一图像

imagecreatetruecolor -- 新建一个真彩色图像

imagedashedline -- 画一虚线

imagedestroy -- 销毁一图像

imageellipse -- 画一个椭圆

imagefill -- 区域填充

imagefilledarc -- 画一椭圆弧且填充

imagefilledellipse -- 画一椭圆并填充

imagefilledpolygon -- 画一多边形并填充

imagefilledrectangle -- 画一矩形并填充

imagefilltoborder -- 区域填充到指定颜色的边界为止

imagefilter --  Applies Filter an image using a custom angle

imagefontheight -- 取得字体高度

imagefontwidth -- 取得字体宽度

imageftbbox -- 取得使用了 FreeType 2 字体的文本的范围

imagefttext -- 使用 FreeType 2 字体将文本写入图像

imagegammacorrect -- 对 GD 图像应用 gamma 修正

imagegd2 -- 输出 GD2 图像

imagegd -- 将 GD 图像输出到浏览器或文件

imagegif -- 以 GIF 格式将图像输出到浏览器或文件

imageinterlace -- 激活或禁止隔行扫描

imageistruecolor -- 检查图像是否为真彩色图像

imagejpeg -- 以 JPEG 格式将图像输出到浏览器或文件

imagelayereffect --  Set the alpha blending flag to use the bundled libgd layering effects

imageline -- 画一条直线

imageloadfont -- 载入一新字体

imagepalettecopy -- 将调色板从一幅图像拷贝到另一幅

imagepng -- 以 PNG 格式将图像输出到浏览器或文件

imagepolygon -- 画一个多边形

imagepsbbox -- 取得使用 PostScript Type1 字体的文本的范围

imagepscopyfont --  拷贝一个已加载的字体以备更改

imagepsencodefont -- 改变字体中的字符编码矢量

imagepsextendfont -- 扩充或压缩字体

imagepsfreefont -- 释放一个 PostScript Type 1 字体所占用的内存

imagepsloadfont -- 从文件中加载一个 PostScript Type 1 字体

imagepsslantfont -- 倾斜某字体

imagepstext -- 用 PostScript Type1 字体把文本字符串画在图像上

imagerectangle -- 画一个矩形

imagerotate -- 用给定角度旋转图像

imagesavealpha --  设置标记以在保存 PNG 图像时保存完整的 alpha 通道信息(与单一透明色相反)

imagesetbrush -- 设定画线用的画笔图像

imagesetpixel -- 画一个单一像素

imagesetstyle -- 设定画线的风格

imagesetthickness -- 设定画线的宽度

imagesettile -- 设定用于填充的贴图

imagestring -- 水平地画一行字符串

imagestringup -- 垂直地画一行字符串

imagesx -- 取得图像宽度

imagesy -- 取得图像高度

imagetruecolortopalette -- 将真彩色图像转换为调色板图像

imagettfbbox -- 取得使用 TrueType 字体的文本的范围

imagettftext -- 用 TrueType 字体向图像写入文本

imagetypes -- 返回当前 PHP 版本所支持的图像类型

imagewbmp -- 以 WBMP 格式将图像输出到浏览器或文件

imagexbm --  Output XBM image to browser or file

iptcembed -- 将二进制 IPTC 数据嵌入到一幅 JPEG 图像中

iptcparse --  将二进制 IPTC http://www.iptc.org/ 块解析为单个标记

jpeg2wbmp -- 将 JPEG 图像文件转换为 WBMP 图像文件

png2wbmp -- 将 PNG 图像文件转换为 WBMP 图像文件

read_exif_data -- exif_read_data() 的别名

 

 

MySQL 函数库

mysql_affected_rows -- 取得前一次 MySQL 操作所影响的记录行数

mysql_change_user --  改变活动连接中登录的用户

mysql_client_encoding -- 返回字符集的名称

mysql_close -- 关闭 MySQL 连接

mysql_connect -- 打开一个到 MySQL 服务器的连接

mysql_create_db -- 新建一个 MySQL 数据库

mysql_data_seek -- 移动内部结果的指针

mysql_db_name -- 取得结果数据

mysql_db_query -- 发送一条 MySQL 查询

mysql_drop_db -- 丢弃(删除)一个 MySQL 数据库

mysql_errno --  返回上一个 MySQL 操作中的错误信息的数字编码

mysql_error --  返回上一个 MySQL 操作产生的文本错误信息

mysql_escape_string --  转义一个字符串用于 mysql_query

mysql_fetch_array --  从结果集中取得一行作为关联数组,或数字数组,或二者兼有

mysql_fetch_assoc --  从结果集中取得一行作为关联数组

mysql_fetch_field --  从结果集中取得列信息并作为对象返回

mysql_fetch_lengths --  取得结果集中每个输出的长度

mysql_fetch_object -- 从结果集中取得一行作为对象

mysql_fetch_row -- 从结果集中取得一行作为枚举数组

mysql_field_flags --  从结果中取得和指定字段关联的标志

mysql_field_len --  返回指定字段的长度

mysql_field_name --  取得结果中指定字段的字段名

mysql_field_seek --  将结果集中的指针设定为制定的字段偏移量

mysql_field_table --  取得指定字段所在的表名

mysql_field_type --  取得结果集中指定字段的类型

mysql_free_result -- 释放结果内存

mysql_get_client_info -- 取得 MySQL 客户端信息

mysql_get_host_info -- 取得 MySQL 主机信息

mysql_get_proto_info -- 取得 MySQL 协议信息

mysql_get_server_info -- 取得 MySQL 服务器信息

mysql_info --  取得最近一条查询的信息

mysql_insert_id --  取得上一步 INSERT 操作产生的 ID

mysql_list_dbs --  列出 MySQL 服务器中所有的数据库

mysql_list_fields -- 列出 MySQL 结果中的字段

mysql_list_processes -- 列出 MySQL 进程

mysql_list_tables -- 列出 MySQL 数据库中的表

mysql_num_fields -- 取得结果集中字段的数目

mysql_num_rows -- 取得结果集中行的数目

mysql_pconnect --  打开一个到 MySQL 服务器的持久连接

mysql_ping -- Ping 一个服务器连接,如果没有连接则重新连接

mysql_query -- 发送一条 MySQL 查询

mysql_real_escape_string --  转义 SQL 语句中使用的字符串中的特殊字符,并考虑到连接的当前字符集

mysql_result -- 取得结果数据

mysql_select_db -- 选择 MySQL 数据库

mysql_stat -- 取得当前系统状态

mysql_tablename -- 取得表名

mysql_thread_id -- 返回当前线程的 ID

mysql_unbuffered_query --  向 MySQL 发送一条 SQL 查询,并不获取和缓存结果的行

 

正则表达式函数库(Perl 兼容)

preg_grep --  返回与模式匹配的数组单元

preg_match_all -- 进行全局正则表达式匹配

preg_match -- 进行正则表达式匹配

preg_quote -- 转义正则表达式字符

preg_replace_callback -- 用回调函数执行正则表达式的搜索和替换

preg_replace -- 执行正则表达式的搜索和替换

preg_split -- 用正则表达式分割字符串

ereg_replace -- 替换正则表达式

ereg -- 正则表达式匹配

eregi_replace -- 不区分大小写替换正则表达式

eregi -- 不区分大小写的正则表达式匹配

split -- 用正则表达式将字符串分割到数组中

spliti --  用正则表达式不区分大小写将字符串分割到数组中

sql_regcase --  产生用于不区分大小的匹配的正则表达式

 

字符串处理函数库

addcslashes -- 像 C 那样使用反斜线转义字符串中的字符

addslashes -- 使用反斜线引用字符串

bin2hex --  将二进制数据转换成十六进制表示

chop -- rtrim() 的别名函数

chr -- 返回指定的字符

chunk_split -- 将字符串分割成小块

convert_cyr_string --  将字符由一种 Cyrillic 字符转换成另一种

convert_uudecode --  Decode a uuencoded string

convert_uuencode --  Uuencode a string

count_chars --  返回字符串所用字符的信息

crc32 -- 计算一个字符串的 crc32 多项式

crypt -- One-way string encryption (hashing)

echo -- Output one or more strings

explode -- Split a string by string

fprintf -- Write a formatted string to a stream

get_html_translation_table --  Returns the translation table used by htmlspecialchars() and htmlentities()

hebrev --  Convert logical Hebrew text to visual text

hebrevc --  Convert logical Hebrew text to visual text with newline conversion

html_entity_decode --  Convert all HTML entities to their applicable characters

htmlentities --  Convert all applicable characters to HTML entities

htmlspecialchars --  Convert special characters to HTML entities

implode -- Join array elements with a string

join -- Alias of implode()

levenshtein --  Calculate Levenshtein distance between two strings

localeconv -- Get numeric formatting information

ltrim --  Strip whitespace from the beginning of a string

md5_file -- Calculates the md5 hash of a given filename

md5 -- Calculate the md5 hash of a string

metaphone -- Calculate the metaphone key of a string

money_format -- Formats a number as a currency string

nl_langinfo --  Query language and locale information

nl2br --  Inserts HTML line breaks before all newlines in a string

number_format -- Format a number with grouped thousands

ord -- Return ASCII value of character

parse_str -- Parses the string into variables

print -- Output a string

printf -- Output a formatted string

quoted_printable_decode --  Convert a quoted-printable string to an 8 bit string

quotemeta -- Quote meta characters

rtrim --  Strip whitespace from the end of a string

setlocale -- Set locale information

sha1_file -- Calculate the sha1 hash of a file

sha1 -- Calculate the sha1 hash of a string

similar_text --  Calculate the similarity between two strings

soundex -- Calculate the soundex key of a string

sprintf -- Return a formatted string

sscanf --  Parses input from a string according to a format

str_ireplace --  Case-insensitive version of str_replace().

str_pad --  Pad a string to a certain length with another string

str_repeat -- Repeat a string

str_replace --  Replace all occurrences of the search string with the replacement string

str_rot13 -- Perform the rot13 transform on a string

str_shuffle -- Randomly shuffles a string

str_split --  Convert a string to an array

str_word_count --  Return information about words used in a string

strcasecmp --  Binary safe case-insensitive string comparison

strchr -- Alias of strstr()

strcmp -- Binary safe string comparison

strcoll -- Locale based string comparison

strcspn --  Find length of initial segment not matching mask

strip_tags -- Strip HTML and PHP tags from a string

stripcslashes --  Un-quote string quoted with addcslashes()

stripos --  Find position of first occurrence of a case-insensitive string

stripslashes --  Un-quote string quoted with addslashes()

stristr --  Case-insensitive strstr()

strlen -- Get string length

strnatcasecmp --  Case insensitive string comparisons using a "natural order" algorithm

strnatcmp --  String comparisons using a "natural order" algorithm

strncasecmp --  Binary safe case-insensitive string comparison of the first n characters

strncmp --  Binary safe string comparison of the first n characters

strpbrk --  Search a string for any of a set of characters

strpos --  Find position of first occurrence of a string

strrchr --  Find the last occurrence of a character in a string

strrev -- Reverse a string

strripos --  Find position of last occurrence of a case-insensitive string in a string

strrpos --  Find position of last occurrence of a char in a string

strspn --  Find length of initial segment matching mask

strstr -- Find first occurrence of a string

strtok -- Tokenize string

strtolower -- Make a string lowercase

strtoupper -- Make a string uppercase

strtr -- Translate certain characters

substr_compare --  Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters

substr_count -- Count the number of substring occurrences

substr_replace -- Replace text within a portion of a string

substr -- Return part of a string

trim --  Strip whitespace from the beginning and end of a string

ucfirst -- Make a string's first character uppercase

ucwords --  Uppercase the first character of each word in a string

vprintf -- Output a formatted string

vsprintf -- Return a formatted string

wordwrap --  Wraps a string to a given number of characters using a string break character.

 

URL 函数库

base64_decode -- 对使用 MIME base64 编码的数据进行解码

base64_encode -- 使用 MIME base64 对数据进行编码

get_headers --  Fetches all the headers sent by the server in response to a HTTP request

get_meta_tags --  从一个文件中提取所有的 meta 标签 content 属性,返回一个数组

http_build_query -- 生成 url-encoded 之后的请求字符串

parse_url -- 解析 URL,返回其组成部分

rawurldecode -- 对已编码的 URL 字符串进行解码

rawurlencode -- 按照 RFC 1738 对 URL 进行编码

urldecode -- 解码已编码的 URL 字符串

urlencode -- 编码 URL 字符串

 

变量函数库

doubleval -- floatval() 的别名

empty -- 检查一个变量是否为空

floatval -- 获取变量的浮点值

get_defined_vars --  返回由所有已定义变量所组成的数组

get_resource_type --  返回资源(resource)类型

gettype -- 获取变量的类型

import_request_variables -- 将 GET/POST/Cookie 变量导入到全局作用域中

intval -- 获取变量的整数值

is_array -- 检测变量是否是数组

is_bool --  检测变量是否是布尔型

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 -- 检测变量是否是字符串

isset -- 检测变量是否设置

print_r --  打印关于变量的易于理解的信息。

serialize --  产生一个可存储的值的表示

settype -- 设置变量的类型

strval -- 获取变量的字符串值

unserialize --  从已存储的表示中创建 PHP 的值

unset -- 释放给定的变量

var_dump -- 打印变量的相关信息

var_export -- 输出或返回一个变量的字符串表示

 

W32api 函数库

w32api_deftype -- 为 w32api_functions 函数定一个类型

w32api_init_dtype --  创建了一个数据类型的实例,并且将函数传入的值填入其中

w32api_invoke_function -- 带有一个参数的执行一个函数,参数传递在函数名的后面

w32api_register_function -- 从函数库中使用 PHP 注册一个函数 function_name

w32api_set_call_method -- 设置调用的方法

 

XML 语法解析函数库

utf8_decode --  将用 UTF-8 方式编码的 ISO-8859-1 字符串转换成单字节的 ISO-8859-1 字符串。

utf8_encode -- 将 ISO-8859-1 编码的字符串转换为 UTF-8 编码

xml_error_string -- 获取 XML 解析器的错误字符串

xml_get_current_byte_index -- 获取 XML 解析器的当前字节索引(current byte index)。

xml_get_current_column_number --  获取 XML 解析器的当前列号

xml_get_current_line_number -- 获取 XML 解析器的当前行号

xml_get_error_code -- 获取 XML 解析器错误代码

xml_parse_into_struct -- 将 XML 数据解析到数组中

xml_parse -- 开始解析一个 XML 文档

xml_parser_create_ns --  生成一个支持命名空间的 XML 解析器

xml_parser_create -- 建立一个 XML 解析器

xml_parser_free -- 释放指定的 XML 解析器

xml_parser_get_option -- 从 XML 解析器获取选项设置信息

xml_parser_set_option -- 为指定 XML 解析进行选项设置

xml_set_character_data_handler -- 建立字符数据处理器

xml_set_default_handler -- 建立默认处理器

xml_set_element_handler -- 建立起始和终止元素处理器

xml_set_end_namespace_decl_handler --  建立终止命名空间声明处理器

xml_set_external_entity_ref_handler -- 建立外部实体指向处理器

xml_set_notation_decl_handler -- 建立注释声明处理器

xml_set_object -- 在对象中使用 XML 解析器

xml_set_processing_instruction_handler --  建立处理指令(PI)处理器

xml_set_start_namespace_decl_handler --  建立起始命名空间声明处理器

xml_set_unparsed_entity_decl_handler --  建立未解析实体定义声明处理器

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值