3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $preparationDelayWarehouse = 2; $date = new DateTime("2017-07-07"); $pickUpDelay = $date->add(new DateInterval('P'.$preparationDelayWarehouse.'D')); var_dump($pickUpDelay);
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-07-09 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }