3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = '2014-01-01 00:00:00'; $date_res = date_create_from_format('Y-m-d H:i:s', $start); $date_end = $date_res->add(new DateInterval('PT' . $this->duration_hours . 'M')); var_dump($date_end->format("Y-m-d H:i:s")); echo "<br>";

preferences:
49.21 ms | 402 KiB | 5 Q