3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(); $birthday = new DateTime('1973-04-18 09:48:00'); echo $now->diff($birthday)->format('%y years'); // 49 years

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.91 ms | 1715 KiB | 10 Q