3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (new DateTime('2015-10-18'))->modify('-7 days')->setTime(0, 0, 0)->format('Y-m-d H:i:s');
based on YvsUr
Output for 5.4.0 - 7.2.0
2015-10-11 00:00:00
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/ok1DF on line 3
Process exited with code 255.