$birthday = 1982-07-24; $now = date("Ymd"); $birth = str_replace("-", "", $birthday);//ハイフンを除去 $age = floor(($now-$birth)/10000);