3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $objDateTime = new DateTime('NOW'); var_dump($objDateTime->format('c')); // ISO8601 formated datetime var_dump($objDateTime->format(DateTime::ISO8601)); // Another way to get an ISO8601
Output for 5.2.0 - 7.1.0
string(25) "2013-12-18T04:26:53+01:00" string(24) "2013-12-18T04:26:53+0100"
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/vrCbl on line 2
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/vrCbl on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/vrCbl on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/vrCbl on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/vrCbl on line 4
Process exited with code 255.