3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_age($birth_date){ return floor((time() - strtotime($birth_date))/31556926); } echo " I am ".get_age("2000-05-10") ." years old";

preferences:
31.51 ms | 402 KiB | 5 Q