3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = new DateTime('now', new Datetimestamp('Europe/Kiev')); echo $time->format('c') . "\n"; $timestamp = $time->setTimezone(new DateTimezone('UTC'))->format('U'); echo $timestamp . "\n"; echo (new DateTime('@' . $timestamp, new DateTimezone('Europe/Kiev')))->format('c') . "\n"; echo (new DateTime('@' . $timestamp, new DateTimezone('Europe/Moscow')))->format('c') . "\n";
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Class "Datetimestamp" not found in /in/VQXl1:3 Stack trace: #0 {main} thrown in /in/VQXl1 on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'Datetimestamp' not found in /in/VQXl1:3 Stack trace: #0 {main} thrown in /in/VQXl1 on line 3
Process exited with code 255.
Output for 5.5.0 - 5.5.35, 5.6.0 - 5.6.28
Fatal error: Class 'Datetimestamp' not found in /in/VQXl1 on line 3
Process exited with code 255.

preferences:
175.02 ms | 402 KiB | 213 Q