3v4l.org

run code in 300+ PHP versions simultaneously
<?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.

preferences:
175.12 ms | 1395 KiB | 35 Q