1、用最少的代码写一个求3值最大值的函数.
function who($a,$b,$c) {
return $a > $b ? ($a > $c ? $a : $c) : ($b > $c ? $b : $c);
}
echo who(33,53,12);
2、求两个日期的差数,例如2007-2-5 ~ 2007-3-6 的日期差数
$date1 = strtotime('2013-09-09');
$date2 = strtotime('2011-12-11');
echo ($date1-$date2)/(24*3600);
3、函数实现-字符串“open_door" 转换成 “Op...