$date = date('Y-m-d',strtotime('1982-3-7'));
pr($date);//1982-03-07
mysql型の日付を分解する
$birthday = 1983-07-15;
$res = array();
$res['year'] = date('Y',strtotime($birthday));//4桁の西暦
$res['month'] = date('n',strtotime($birthday));//1桁の月
$res['day'] = date('j',strtotime($birthday));//1桁の日付
誕生日を計算
$dif = date("Ymd") - date('Ymd',strtotime($res['User']['birthday']));
$age = floor($dif/10000);
echo $age;



