3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print date_create('tuesday next week')->format('d-m-Y'."\n"); print date_create('wednesday next week')->format('d-m-Y'."\n"); print date_create('thursday next week')->format('d-m-Y'."\n"); print date_create('friday next week')->format('d-m-Y'."\n"); print date_create('saturday next week')->format('d-m-Y'."\n"); print date_create('sunday next week')->format('d-m-Y'."\n"); print date_create('monday next week')->format('d-m-Y'."\n"); print date_create('tuesday +2 weeks')->format('d-m-Y'."\n");
Output for 5.6.28, 7.0.12 - 7.1.0
18-02-2014 19-02-2014 20-02-2014 21-02-2014 22-02-2014 23-02-2014 17-02-2014 04-03-2014
Output for 5.6.21, 7.0.6
10-05-2016 11-05-2016 12-05-2016 13-05-2016 14-05-2016 15-05-2016 09-05-2016 17-05-2016
Output for 5.5.0 - 5.5.34, 5.6.0 - 5.6.20, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.5
19-04-2016 20-04-2016 21-04-2016 22-04-2016 23-04-2016 24-04-2016 18-04-2016 26-04-2016
Output for 5.5.35
31-05-2016 01-06-2016 02-06-2016 03-06-2016 04-06-2016 05-06-2016 30-05-2016 07-06-2016
Output for 5.4.0 - 5.4.45
Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 3 19-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 4 20-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 5 21-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 6 22-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 7 23-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 8 24-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 9 18-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/q7Wf3 on line 10 26-04-2016
Output for 5.3.0 - 5.3.29
Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 3 19-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 4 20-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 5 21-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 6 22-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 7 23-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 8 24-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 9 18-04-2016 Warning: date_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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/q7Wf3 on line 10 26-04-2016
Output for 5.2.0 - 5.2.17
19-04-2016 20-04-2016 21-04-2016 22-04-2016 23-04-2016 24-04-2016 25-04-2016 26-04-2016
Output for 5.0.0 - 5.1.6
<br /> <b>Fatal error</b>: Call to undefined function date_create() in <b>/in/q7Wf3</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.4.2 - 4.4.9
<br /> <b>Parse error</b>: syntax error, unexpected T_OBJECT_OPERATOR in <b>/in/q7Wf3</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
<br /> <b>Parse error</b>: parse error, unexpected T_OBJECT_OPERATOR in <b>/in/q7Wf3</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/q7Wf3</b> on line <b>3</b><br />
Process exited with code 255.