This function is used to compare an age relative to a particular date (in this case July 1). It assumes the birthdate is being provided in the format 'dd/mm/year' but needs to be checked against 'year-mm-dd'.

function agecheck($birthDate)
{

$date = explode('/', $birthDate);
$birthDate = $date[2] . '/' . $date[1] . '/' . $date[0];
$age = floor((strtotime('2014-07-01') - strtotime($birthDate)) / 31556926);
return($age);
}