時區設置:date_default_timezone_set(‘PRC’);
strtotime(): 將日期字符串轉換成時間戳(如:2019-3-7),strtotime(‘2019-3-7’)
time(): 當前時間戳
microtime(): 獲得微秒
閏年定義:能被4整除,但不能被100整除
$start = microtime(true);
php程序
$end = microtime(true);
echo $end - $start; 可以計算程序的執行時間
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); 可以屏蔽警告和提示的信息,“@”這個符號也可以屏蔽一些變量未定義的情況。