3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function get_age($birth_date){ return floor((time() - strtotime($birth_date))/31556926); } echo " I am ".get_age("2000-05-10") ." years old";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
I am 13 years old