<?php
{
function ageChange(
$day = substr($birth_date, 8, 2);
$month =substr($birth_date, 5, 2);
$year = substr($birth_date, 0, 4);
$year_diff = date("Y") - $year;
$month_diff = date("m") - $month;
$day_diff = date("d") - $day;
if ($day_diff < 0 && $month_diff==0){$year_diff--;}
if ($day_diff < 0 && $month_diff < 0){$year_diff--;}
return $year_diff;
)
}
//Call the age function
ageChange();
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25, 5.5.0 - 5.5.9
- Parse error: syntax error, unexpected '(', expecting ')' in /in/l2HHM on line 5
Process exited with code 255.
preferences:
189.05 ms | 1395 KiB | 72 Q