Nov
21
PHP 4到今年年底PHP Group将不再对其进行支持了,所以为了让大家更有信心的转移到PHP 5平台上,我特别做了这个测试,看看我们PHP 4.x 是否真的性能比我们的PHP 5.x要好捏,测试结果很明显,那就是PHP 5.x 比php 4.x不论是面向对象还是面向过程,都要比PHP 4.x 要快,所以大家完全有必要转移到PHP 5.x 平台上,去体验PHP 5.x 平台的各种功能和性能。
Nov
19
// YYYYMMDD-7HH~YYYYMMDD-HH
$start_date = mktime(date("H"),0,0,date("m"),date("d")-7,date("Y"));
$start_year = date("Y",$start_date);
$start_month = date("m",$start_date);
$start_day = date("d",$start_date);
$start_hour = date("H",$start_date);
$end_date = mktime(date("H")+1,0,0,date("m"),date("d"),date("Y"));
$end_year = date("Y",$end_date);
$end_month = date("m",$end_date);
$end_day = date("d",$end_date);
$end_hour = date("H",$end_date);
$start_date = mktime(date("H"),0,0,date("m"),date("d")-7,date("Y"));
$start_year = date("Y",$start_date);
$start_month = date("m",$start_date);
$start_day = date("d",$start_date);
$start_hour = date("H",$start_date);
$end_date = mktime(date("H")+1,0,0,date("m"),date("d"),date("Y"));
$end_year = date("Y",$end_date);
$end_month = date("m",$end_date);
$end_day = date("d",$end_date);
$end_hour = date("H",$end_date);