3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 1997; $day = 5; $month = 12; $tz = timezone_open('Europe/Berlin'); $age = date_diff(date_create("$year-$month-$day", $tz), date_create('now', $tz)); if ($age->m > 1) { echo 'Greater than 1'; } else { echo 'Not greater than 1'; }

preferences:
33.91 ms | 402 KiB | 5 Q