3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today = new DateTime(); $birthdate = new DateTime("1973-04-18"); $interval = $today->diff($birthdate); echo $interval->format('%y years');

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
166.27 ms | 2800 KiB | 8 Q