(php时间戳转换日期)(php时间戳转换成时间)

<?php

//*

//* 日期、时间

//*

date_default_timezone_set( 'PRC' );

//echo date( 'h:i:s', time() );

//本地化时间戳

//echo mktime( 1, 1, 1, 3 );

//当前时间戳

//echo time();

//获取当前日期和时间

//echo date( 'Y-m-d h:i:s', time() );

//获取日期信息

//$tm = getDate();

//print_r( $tm );

//echo $tm['mon'];

//检验日期的有效性

//$res = checkDate( 2, 3, 2021 );

//var_dump( $res );

//显示本地化的日期和时间

//echo setLocale( LC_ALL, "US" );

//echo '</p>';

//echo setLocale( LC_ALL, NULL );

//将日期和时间解析为UNIX时间戳

//echo strtotime( 'now' );

//echo strtotime( '+3 days' );

//echo strtotime( '2021/2/1' );

//echo strtotime( '9:24' ) - strtotime( '9:00' );

//echo '距离11点还有:' . ( strtotime( '11:00' ) - time() ) . ' 秒';

//$g = strtotime( '2021-10-01' );

//$res = ceil( ( $g - time() ) / ( 24 * 3600 ) );

//echo $res;

$start = microtime();

$arr = range( 1, 100000 );

//print_r( $arr );

$end = microtime();

echo '</p>';

$start = explode( ' ', $start );

$end = explode( ' ', $end );

echo ( (int)$end[1] - (int)$start[1] ) + ( $end[0] - $start[0] );

声明:我要去上班所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流,版权归原作者趣易编程所有,原文出处。若您的权利被侵害,请联系删除。

本文标题:(php时间戳转换日期)(php时间戳转换成时间)
本文链接:https://www.51qsb.cn/article/m87ax.html

(0)
打赏微信扫一扫微信扫一扫QQ扫一扫QQ扫一扫
上一篇2023-05-28
下一篇2023-05-28

你可能还想知道

发表回复

登录后才能评论