3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); $date->setTimezone(new DateTimeZone('America/New_York')); $date->modify('midnight fifth day of next month'); var_dump($date);
based on uPaqP
Output for 7.1.0
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-29 10:26:06.003966" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.28, 7.0.14
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-29 10:26:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.6
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 21:25:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.5
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 10:38:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.4
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 20:17:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.3
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 21:29:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.2
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 08:03:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.1
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 08:15:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.0
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-26 10:39:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.21
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-01 16:27:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.20
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-09 05:51:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.19
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-06 18:59:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.18
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-14 07:54:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.17
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 01:58:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.16
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 11:24:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.15
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 12:17:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.14
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 14:53:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.13
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 18:50:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.12
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-19 07:54:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.11
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 15:11:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.10
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 16:49:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.9
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 22:01:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.8
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 05:44:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.7
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 17:06:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.35
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 19:52:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.34
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 11:48:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.33
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 07:09:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.32
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-16 13:52:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.31
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 04:50:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.30
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-31 14:18:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.29
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-16 08:51:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.28
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 11:12:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.27
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 13:40:15.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.26
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 19:18:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.25
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 01:19:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.24
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 08:44:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.45
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:29:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.44
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:29:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.43
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:29:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.42
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:28:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.41
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:28:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.40
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:28:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.39
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-21 08:28:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.38
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-15 03:06:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.35 - 5.4.37
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-15 03:06:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.34
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-15 03:06:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.30 - 5.4.32
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-29 10:26:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.13 - 5.4.29
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(19) "2014-09-29 10:26:10" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.22 - 5.4.12
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(19) "2014-09-29 10:26:11" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.2 - 5.3.21
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (3) { ["date"]=> string(19) "2014-09-29 10:26:12" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.1
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-11-03 10:26:12" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.0
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-11-03 10:26:13" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.2.13 - 5.2.17
Warning: DateTime::modify(): Failed to parse time string (midnight fifth day of next month) at position 19 (o): The timezone could not be found in the database in /in/YikEW on line 7 object(DateTime)#1 (0) { }
Output for 5.2.0 - 5.2.12
object(DateTime)#1 (0) { }
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/YikEW 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/YikEW 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/YikEW on line 3