3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x=new DateTime(time()-24*3600); $x->modify('monday'); echo $x->format('Y-m-d H:i:s');
based on ghKeq
Output for 7.0.0 - 7.2.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.26, 5.5.28 - 5.6.6, 5.6.8 - 5.6.28
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.
Output for 5.5.27, 5.6.7
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1448797405) at position 8 (0): Unexpected character' in /in/ESZf7:3 Stack trace: #0 /in/ESZf7(3): DateTime->__construct('1448797405') #1 {main} thrown in /in/ESZf7 on line 3
Process exited with code 255.