How to calculate (show, print) people (human) age using php?

How to calculate (show, print) people (human) age using php?

function prigVozrFizVau($darr,$dob){
$dateOfBirth = date("Y-m-d",strtotime($dob));
$today = date("Y-m-d",strtotime($darr));
$diff = date_diff(date_create($dateOfBirth), date_create($today));

return $diff->format('%y');
}

Метаданные статьи

Идентификатор статьи:
62
Категория:
Дата добавления:
14.01.2022 16:08:46
Просмотры:
16,981
Рейтинг (Голоса):
(0)

Связанные статьи