工作 · 2018-07-07 09:56 · 1019 阅读 php从身份证获取出生日期方法(兼容15位与18位身份证号) $birthday = strlen($card)==15 ? ('19' . substr($card, 6, 6)) : substr($card, 6, 8); echo $birthday 上一篇 php从身份证获取性别方法 下一篇 PHP用*号替代姓名除第一个字之外的字符