3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (class_exists('DateTime') && method_exists('DateTime', 'modify')) { $d = new DateTime('2014W02'); if (method_exists( echo $d->modify('-1 week')->format('r'), PHP_EOL; }
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ')' in /in/FhiOl on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ECHO, expecting ')' in /in/FhiOl on line 6
Process exited with code 255.