list($year, $month, $day)=explode(“-“, $_GET[“birthday”]);
$ageunix=time()-mktime(0, 0, 0, $month, $day, $year);
$age=$ageunix/(60*60*24*365);
echo “我的年龄:”.floor($age);
list($year, $month, $day)=explode(“-“, $_GET[“birthday”]);
$ageunix=time()-mktime(0, 0, 0, $month, $day, $year);
$age=$ageunix/(60*60*24*365);
echo “我的年龄:”.floor($age);
文章来源:智云一二三科技
文章标题:php计算yourAge
文章地址:https://www.zhihuclub.com/150022.shtml