3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $firstOfMonth = "2011-01-01" echo "firstOfMonth: " . $firstOfMonth . "\n"; $firstOfMonthDate = \DateTime::createFromFormat('Y-m-d|', $firstOfMonth); var_dump($firstOfMonthDate);
Output for 5.4.0 - 5.4.21
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/8h5rX on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_ECHO in /in/8h5rX on line 3
Process exited with code 255.