3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(strtotime('next Monday 2014-10-03')); echo $date->format("Y-m-d");
based on cj48C
Output for 5.2.0 - 5.4.32, 5.6.28, 7.0.14 - 7.1.0
6400-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 hhvm-3.12.0
6400-03-13
Output for hhvm-3.10.0
6400-03-30
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.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.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