3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $week = 4; $week = sprintf("%04d", $week); echo $week; echo "\r\n"; $datetimeWeekStart = new DateTime('2013-W04-0'); echo $datetimeWeekStart->format('jS, F Y'); echo "\r\n"; echo $datetimeWeekStart->getTimestamp(); echo "\r\n"; $datetimeWeekEnd = new DateTime('2013-W04-7'); echo "\r\n"; echo $datetimeWeekEnd->format('jS, F Y'); echo "\r\n"; echo $datetimeWeekEnd->getTimestamp();
Output for 5.3.0 - 7.2.0
0004 20th, January 2013 1358636400 27th, January 2013 1359241200
Output for 5.2.0 - 5.2.17
0004 20th, January 2013 Fatal error: Call to undefined method DateTime::getTimestamp() in /in/tv3f0 on line 14
Process exited with code 255.
Output for 5.0.0 - 5.1.6
0004 Fatal error: Class 'DateTime' not found in /in/tv3f0 on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.9
0004 Fatal error: Cannot instantiate non-existent class: datetime in /in/tv3f0 on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
0004 Fatal error: Cannot instantiate non-existent class: datetime in /in/tv3f0 on line 11