3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $yyyy = '1995'; $mm = '03'; $dd = '13'; $ageY = date("Y")-intval($yyyy); $ageM = date("n")-intval($mm); $ageD = date("j")-intval($dd); if($ageD < 0){ $ageD = $ageD += date("t"); $ageM--; } if($ageM < 0){ $ageM+=12; $ageY--; } $age = $ageY."/".$ageM."/".$ageD; echo $age;
based on jjTiD
Output for 4.3.0 - 7.2.0
20/0/6