3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=new DateTime('now'); $x->modify('first day of week'); echo $x->format('Y-m-d H:i:s');
Output for 8.3.0 - 8.3.4
Fatal error: Uncaught DateMalformedStringException: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU:4 Stack trace: #0 /in/jt9mU(4): DateTime->modify('first day of we...') #1 {main} thrown in /in/jt9mU on line 4
Process exited with code 255.
Output for 5.6.28, 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2015-11-30 12:41:08
Output for 7.3.32 - 7.3.33, 8.0.13
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2015-11-30 11:41:08
Output for 7.0.6
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-05-03 19:49:12
Output for 7.0.5
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-03 08:09:18
Output for 7.0.4
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-10 20:03:12
Output for 7.0.3
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-18 21:23:58
Output for 7.0.2
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-23 03:37:45
Output for 7.0.1
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-24 06:55:05
Output for 7.0.0
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-27 08:49:46
Output for 5.6.21
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-05-02 14:57:19
Output for 5.6.20
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-10 07:10:24
Output for 5.6.19
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-08 04:15:44
Output for 5.6.18
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-15 13:05:55
Output for 5.6.17
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-20 00:40:50
Output for 5.6.16
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-28 09:38:50
Output for 5.6.15
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-29 10:28:24
Output for 5.6.14
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-02 12:18:37
Output for 5.6.13
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-15 16:49:47
Output for 5.6.12
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-20 07:16:33
Output for 5.6.11
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-24 13:41:11
Output for 5.6.10
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-25 15:44:48
Output for 5.6.9
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-27 20:53:23
Output for 5.6.8
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-30 05:42:34
Output for 5.5.35
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-05-22 23:48:10
Output for 5.5.34
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-11 09:21:48
Output for 5.5.33
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-09 07:08:13
Output for 5.5.32
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-17 16:56:52
Output for 5.5.31
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-03-21 03:46:13
Output for 5.5.30
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-01 12:21:22
Output for 5.5.29
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-17 07:07:49
Output for 5.5.28
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-21 10:32:18
Output for 5.5.27
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-22 12:15:04
Output for 5.5.26
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-26 18:25:40
Output for 5.5.25
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-04-29 01:49:08
Output for 5.5.24
Warning: DateTime::modify(): Failed to parse time string (first day of week) at position 13 (w): The timezone could not be found in the database in /in/jt9mU on line 4 2016-05-24 08:00:19

preferences:
173.18 ms | 401 KiB | 179 Q