successful()) { }else{ Log::info("短信发送失败"); } } //根据生日 获取年龄 public static function GetAge($birthday) { $dob = new DateTime($birthday); $now = new DateTime(); // 计算两个日期之间的差值 $interval = $now->diff($dob); // 返回年龄 return $interval->y; } }