Obtener fecha de nacimiento
$curp = "BARI080224HDFLDR02";
$rest = substr($curp, 4, -8);
$born = DateTime::createFromFormat('ymd', $rest);
if (date("Y") - date_format($born, 'Y') <= 0){
$born->sub(new DateInterval('P100Y')); //-100 años
}
echo "<br>".$born->format('Y-m-d');