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("1978-12-30") ." years old";

preferences:
32.97 ms | 402 KiB | 5 Q