为编程爱好者分享易语言教程源码的资源网

网站首页 > 网络编程 > PHP编程 正文

php学习视频017日期和时间演示文档(php制作日期计算器)

三叶资源网 2022-09-16 20:18:50 PHP编程 1217 ℃ 0 评论

<?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] );

来源:三叶资源网,欢迎分享,公众号:iisanye,(三叶资源网⑤群:21414575

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

百度站内搜索
关注微信公众号
三叶资源网⑤群:三叶资源网⑤群

网站分类
随机tag
扒站工具Bass音频库QQ网页登录算法模块源码易语言多开中控源码酷狗繁星PC协议LOL归属地查询网易滑块位置识别人工智能取已登录QQ网易云音乐播放器获取控制台应用返回值ex_ui界面支持库RibbonUI163邮箱注册易语言调用JAVA源码抗锯齿GDIPlus类仿易语言IDE
最新评论