PHP常用系统函数的 学习资料

输出函数

  • echo($string): 输出一个或多个字符串。
  • print($string): 输出一个字符串。
  • printf($format, $args): 根据指定的格式输出格式化的字符串。
  • var_dump($expression): 打印变量的相关信息,包括类型和值。
  • print_r($expression): 打印变量的易读版本,用于调试和开发。

时间函数

  • time(): 返回当前的UNIX时间戳。
  • date($format, $timestamp): 格式化日期和时间。
  • strtotime($time, $now): 将任何英文文本的日期或时间描述解析为UNIX时间戳。
  • gmdate($format, $timestamp): 格林威治标准时间(GMT)下的日期和时间。
  • mktime($hour, $minute, $second, $month, $day, $year): 返回一个日期的UNIX时间戳。
相关推荐
JaguarJack18 分钟前
FrankenPHP 原生支持 Windows 了
后端·php·服务端
BingoGo1 小时前
FrankenPHP 原生支持 Windows 了
后端·php
JaguarJack1 天前
PHP 的异步编程 该怎么选择
后端·php·服务端
BingoGo1 天前
PHP 的异步编程 该怎么选择
后端·php
JaguarJack2 天前
为什么 PHP 闭包要加 static?
后端·php·服务端
ServBay3 天前
垃圾堆里编码?真的不要怪 PHP 不行
后端·php
用户962377954483 天前
CTF 伪协议
php
BingoGo5 天前
当你的 PHP 应用的 API 没有限流时会发生什么?
后端·php
JaguarJack5 天前
当你的 PHP 应用的 API 没有限流时会发生什么?
后端·php·服务端
BingoGo6 天前
OpenSwoole 26.2.0 发布:支持 PHP 8.5、io_uring 后端及协程调试改进
后端·php