/** * 验证18位身份证(计算方式在百度百科有) * @param string $id 身份证 * return boolean */ function check_identity($id='') { $set = array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2); $ver = array('1','0','x','9','8','7','6','5','4','3','2'); $arr = str_split($id); $sum = 0; fo