3v4l.org

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

preferences:
31.79 ms | 406 KiB | 6 Q