3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTimeImmutable('2018-01-01'); print_r($date); $date->__construct('1999-01-01'); print_r($date);

preferences:
46.54 ms | 404 KiB | 5 Q