3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$date = new DateTime(); //echo $date->sub(new DateInterval("P60D"))->format("Y-m-d"); echo new DateTime()->sub(new DateInterval("P60D"))->format("Y-m-d");
Output for 5.4.0 - 5.4.8
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' in /in/QWLUZ on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.18
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/QWLUZ on line 5
Process exited with code 255.