3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=new DateTime(time()-24*3600); $x->modify('monday'); echo $x->format('Y-m-d H:i:s');
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1448797406) at position 8 (0): Unexpected character in /in/ESZf7:3 Stack trace: #0 /in/ESZf7(3): DateTime->__construct('1448797406') #1 {main} thrown in /in/ESZf7 on line 3
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1448797406) at position 8 (0): Unexpected character' in /in/ESZf7:3 Stack trace: #0 /in/ESZf7(3): DateTime->__construct('1448797406') #1 {main} thrown in /in/ESZf7 on line 3
Process exited with code 255.

preferences:
155.51 ms | 402 KiB | 193 Q