3v4l.org - online PHP & HHVM shell, execute code in 100+ different versions!

<?php $dt = new DateTime; for ($w = 52; $w <= 54; $w++) { $dt->setISODate(2013, $w); echo $dt->format('Y-m-d W') . "\n\n"; }
Output for 5.2.0 - 5.6.3, php7@20140507 - 20141101, hhvm-3.2.0 - 3.4.0
2013-12-23 52 2013-12-30 01 2014-01-06 02
Output for hhvm-3.0.1 - 3.1.0
Strict Warning: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /in/5Dg31 on line 3 #0 DateTime->__construct(), called at [/in/5Dg31:3] #0 DateTime->__construct(), called at [/in/5Dg31:3] Strict Warning: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /in/5Dg31 on line 3 #0 DateTime->__construct(), called at [/in/5Dg31:3] #0 DateTime->__construct(), called at [/in/5Dg31:3] 2013-12-23 52 2013-12-30 01 2014-01-06 02
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/5Dg31 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/5Dg31 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/5Dg31 on line 3