- var_dump: documentation ( source)
- abs: documentation ( source)
- time: documentation ( source)
- floor: documentation ( source)
- strtotime: documentation ( source)
<?php
$dt = '1990-07-22 00:00:00';
$year = 60 * 60 * 24 * 365;
var_dump([
'year' => $year,
'now' => time(),
'age' => floor(abs((time() - strtotime($dt))/$dateTime::YEAR)),
]);