3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); $date->add('+2days'); var_dump($date);
Output for 7.3.0rc4
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.002690" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0rc3
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.002308" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0beta1
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.001456" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.3.0alpha1
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.004674" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.6
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.002427" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.2.0
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.003855" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.20
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.001711" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.10
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.003697" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.7
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.027203" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.6
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.013245" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.5
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.011450" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 7.1.0
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.006166" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.4.30 - 5.4.45, 5.5.14 - 7.0.20
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-10 15:55:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.0 - 5.4.29, 5.5.0 - 5.5.13
Warning: DateTime::add() expects parameter 1 to be DateInterval, string given in /in/hf1he on line 4 object(DateTime)#1 (3) { ["date"]=> string(19) "2013-09-10 15:55:58" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::add() in /in/hf1he on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/hf1he 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/hf1he 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/hf1he on line 3