3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTimeImmutable('now'); echo $dt->getTimestamp() . "\n"; $dt->__construct('tomorrow'); echo $dt->getTimestamp() . "\n";
Output for 8.0.21 - 8.0.22, 8.1.8 - 8.1.9
1656943098 1656972000
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.20, 8.1.0 - 8.1.7
1656943076 1656972000
Output for 4.3.0
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/Eu17b on line 3

preferences:
29.26 ms | 411 KiB | 5 Q