3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date1 = DateTime::createFromFormat('d.m.y', '03.02.13')->modify('last day of month'); $date2 = DateTime::createFromFormat('d.m.y', '03.02.13'); var_dump($date1); var_dump($date2);
based on VRRFg
Output for 5.6.28, 7.0.20 - 7.2.0
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.6
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 19:05:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.5
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 16:13:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.4
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 22:24:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.3
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 00:00:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.2
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 06:07:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.1
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 09:09:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.0.0
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 11:00:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.21
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:19:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.20
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 13:18:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.19
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 06:33:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.18
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 15:34:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.17
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 03:12:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.16
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 11:50:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.15
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 12:40:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.14
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 20:56:29.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.13
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:44:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.12
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 12:46:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.11
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 18:41:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.10
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 20:49:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.9
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 02:47:48.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.8
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 10:34:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.35
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 10:35:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.34
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 15:35:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.33
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 09:39:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.32
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 19:35:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.31
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 06:22:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.30
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 17:01:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.29
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 11:54:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.28
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 15:35:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.27
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 17:06:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.26
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 23:31:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.25
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 07:05:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.24
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 14:13:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.45
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.44
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:55.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.41 - 5.4.43
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.40
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:57.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.39
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.37 - 5.4.38
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:10:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.34 - 5.4.36
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:11:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.32
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:11:01.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.30 - 5.4.31
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-03 21:11:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.29, 5.4.29
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:02" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.25 - 5.4.28
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:03" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.28, 5.4.23 - 5.4.24
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:04" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.20 - 5.4.22
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:05" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.27, 5.4.17 - 5.4.19
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:06" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.16
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:07" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.22 - 5.3.23, 5.4.12
Warning: DateTime::modify(): Failed to parse time string (last day of month) at position 12 (m): The timezone could not be found in the database in /in/siYFk on line 3 bool(false) object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-03 21:11:08" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }