PHP函数速查表 PHP函数大全 - 按Ctrl+D收藏本页

数组函数 参数的顺序为 "小, 大", 字符串函数 则相反,顺序为 "大, 小"。


数组



字符串



多字节字符串



变量处理



文件系统



目录处理


  • Directory — Directory 类

  • 目录函数函数


    数学



    类和对象



    字符类型检测Ctype



    日期和时间(more)



    CURL



  • CURLFile — CURLFile 类

  • 过滤器Filter



    函数处理



    正则处理PCRE



    网络Network



    程序执行

    以加锁方式打开的文件(特别是在打开会话时), 必须在执行后台程序之前关闭。

    PHP选项和信息



    错误处理



    输出缓冲控制



    密码散列算法



    会话Session



  • SessionHandler — The SessionHandler class

  • SessionHandlerInterface — The SessionHandlerInterface class

  • SessionIdInterface — The SessionIdInterface interface

  • SessionUpdateTimestampHandlerInterface — The SessionUpdateTimestampHandlerInterface interface

  • CSPRNG伪随机数产生器



    JSON


  • JsonException — JsonException 类

  • JsonSerializable — JSON 序列化接口

  • JSON 函数
    • json_encode - 对变量进行 JSON 编码 // return json_encode(['code'=>200,'data'=>$data],JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    • json_decode - 对 JSON 格式的字符串进行解码
    • json_last_error - 编码或解码时返回最后发生的错误
    • json_last_error_msg - 返回最后一个json_encode()或json_decode()调用的错误字符串

  • Stream(more)



    SPL(more)



    BCMath



    杂项



    Hash



    PDO


    PDO - PDO类
    PDOStatement - PDOStatement类
  • PDOException — PDOException 异常类

  • MySQLi


    mysqli - mysqli类
    mysqli_stmt - mysqli_stmt类
    mysqli_result - mysqli_result类
  • mysqli_driver — The mysqli_driver class

  • mysqli_warning — The mysqli_warning class

  • mysqli_sql_exception — The mysqli_sql_exception class

  • 别名和不推荐使用的Mysqli函数

    文件信息Fileinfo



  • finfo — finfo 类

  • 字符集转换iconv



    图像处理GD



  • GdImage — The GdImage class

  • Exif可交换图像信息



    URLs



    套接字Sockets



  • Socket — The Socket class
  • AddressInfo — The AddressInfo class

  • XML解析器



  • XmlParser — The XmlParser class

  • OPcache



    APC用户缓存



  • APCUIterator — The APCUIterator class

  • 外部函数接口


  • FFI\CData — C Data Handles
  • FFI\CType — C Type Handles
  • FFI\Exception — FFI Exceptions
  • FFI\ParserException — FFI Parser Exceptions

  • MongoDB


  • 参考https://www.php.net/manual/zh/set.mongodb.php

  • Redis


  • 参考https://github.com/phpredis/phpredis