3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(strtotime('next Monday 2014-10-03')); echo $date->format("Y-m-d");
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.32, 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 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, 8.3.0 - 8.3.4
6400-10-03
Output for 7.3.32 - 7.3.33, 8.0.13
3600-10-03
Output for 7.0.6
6400-05-03
Output for 7.0.5
6400-04-03
Output for 7.0.4
6400-03-10
Output for 7.0.3
6400-03-18
Output for 7.0.2
6400-03-22
Output for 7.0.1
6400-03-24
Output for 7.0.0
6400-03-27
Output for 5.6.21
6400-05-02
Output for 5.6.20
6400-04-10
Output for 5.6.19
6400-03-08
Output for 5.4.34 - 5.4.38, 5.6.18
6400-03-15
Output for 5.6.17
6400-03-19
Output for 5.6.16
6400-03-28
Output for 5.6.15
6400-03-29
Output for 5.6.14
6400-04-02
Output for 5.6.13
6400-04-15
Output for 5.6.12
6400-04-20
Output for 5.6.11
6400-04-23
Output for 5.6.10
6400-04-25
Output for 5.6.9
6400-04-27
Output for 5.6.8
6400-04-30
Output for 5.5.35
6400-05-22
Output for 5.5.34
6400-04-11
Output for 5.5.33
6400-03-09
Output for 5.5.32
6400-03-17
Output for 5.5.31
6400-03-21
Output for 5.5.30
6400-04-01
Output for 5.5.29
6400-04-17
Output for 5.5.28
6400-04-21
Output for 5.5.27
6400-04-22
Output for 5.5.26
6400-04-26
Output for 5.5.25
6400-04-28
Output for 5.5.24
6400-05-24
Output for 5.4.45
6400-09-18
Output for 5.4.39 - 5.4.44
6400-08-22
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/hR36I on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/hR36I on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/hR36I on line 4

preferences:
237.17 ms | 401 KiB | 339 Q