3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bithdayDate = "1993-08-20"; $tdate = strtotime(date("Y-m-d")); $age = 0; while( $tdate > $dob = strtotime('+1 year', $bithdayDate)) { ++$age; } echo $age;

preferences:
33.99 ms | 402 KiB | 5 Q