3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print date_create('next week tuesday')->format('d-m-Y'."\n"); print date_create(' next week wednesday')->format('d-m-Y'."\n"); print date_create(' next week thursday')->format('d-m-Y'."\n"); print date_create(' next week friday')->format('d-m-Y'."\n"); print date_create(' next week saturday')->format('d-m-Y'."\n"); print date_create(' next week sunday')->format('d-m-Y'."\n"); print date_create(' next week monday')->format('d-m-Y'."\n"); print date_create(' +2 weeks tuesday')->format('d-m-Y'."\n");
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25, 5.6.28, 7.0.14 - 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.30, 5.6.14, 7.0.5
05-04-2016 06-04-2016 07-04-2016 08-04-2016 09-04-2016 10-04-2016 04-04-2016 19-04-2016
Output for 7.0.4
15-03-2016 16-03-2016 17-03-2016 18-03-2016 19-03-2016 20-03-2016 14-03-2016 29-03-2016
Output for 5.5.32, 5.6.17, 7.0.3
22-03-2016 23-03-2016 24-03-2016 25-03-2016 26-03-2016 27-03-2016 21-03-2016 05-04-2016
Output for 5.5.31, 7.0.2
29-03-2016 30-03-2016 31-03-2016 01-04-2016 02-04-2016 03-04-2016 28-03-2016 05-04-2016
Output for 7.0.0 - 7.0.1
29-03-2016 30-03-2016 31-03-2016 01-04-2016 02-04-2016 03-04-2016 28-03-2016 12-04-2016
Output for 5.6.20
12-04-2016 13-04-2016 14-04-2016 15-04-2016 16-04-2016 17-04-2016 11-04-2016 26-04-2016
Output for 5.5.33, 5.6.19
15-03-2016 16-03-2016 17-03-2016 18-03-2016 19-03-2016 20-03-2016 14-03-2016 22-03-2016
Output for 5.6.18
22-03-2016 23-03-2016 24-03-2016 25-03-2016 26-03-2016 27-03-2016 21-03-2016 29-03-2016
Output for 5.6.15 - 5.6.16
05-04-2016 06-04-2016 07-04-2016 08-04-2016 09-04-2016 10-04-2016 04-04-2016 12-04-2016
Output for 5.5.29, 5.6.13
19-04-2016 20-04-2016 21-04-2016 22-04-2016 23-04-2016 24-04-2016 18-04-2016 03-05-2016
Output for 5.6.12
26-04-2016 27-04-2016 28-04-2016 29-04-2016 30-04-2016 01-05-2016 25-04-2016 03-05-2016
Output for 5.5.27 - 5.5.28, 5.6.11
26-04-2016 27-04-2016 28-04-2016 29-04-2016 30-04-2016 01-05-2016 25-04-2016 10-05-2016
Output for 5.5.26, 5.6.10
03-05-2016 04-05-2016 05-05-2016 06-05-2016 07-05-2016 08-05-2016 02-05-2016 10-05-2016
Output for 5.5.25, 5.6.8 - 5.6.9
03-05-2016 04-05-2016 05-05-2016 06-05-2016 07-05-2016 08-05-2016 02-05-2016 17-05-2016
Output for 5.6.7
31-05-2016 01-06-2016 02-06-2016 03-06-2016 04-06-2016 05-06-2016 30-05-2016 14-06-2016
Output for 5.5.24, 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.5.34
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.4.41 - 5.4.45
22-09-2015 23-09-2015 24-09-2015 25-09-2015 26-09-2015 27-09-2015 21-09-2015 29-09-2015
Output for 5.4.39 - 5.4.40
12-05-2015 13-05-2015 14-05-2015 15-05-2015 16-05-2015 17-05-2015 11-05-2015 26-05-2015
Output for 5.4.38
10-03-2015 11-03-2015 12-03-2015 13-03-2015 14-03-2015 15-03-2015 09-03-2015 17-03-2015
Output for 5.4.36 - 5.4.37
17-02-2015 18-02-2015 19-02-2015 20-02-2015 21-02-2015 22-02-2015 16-02-2015 24-02-2015
Output for 5.4.34 - 5.4.35
09-12-2014 10-12-2014 11-12-2014 12-12-2014 13-12-2014 14-12-2014 08-12-2014 23-12-2014
Output for 5.3.29, 5.4.26 - 5.4.32
09-09-2014 10-09-2014 11-09-2014 12-09-2014 13-09-2014 14-09-2014 08-09-2014 23-09-2014
Output for 5.2.0 - 5.2.17
25-02-2014 26-02-2014 27-02-2014 21-02-2014 22-02-2014 23-02-2014 24-02-2014 04-03-2014
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function date_create() in /in/4CknW on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/4CknW on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/4CknW on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/4CknW on line 3
Process exited with code 255.