3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = '2015-01-01'; $dd = new DateTime($d); print_r($dd->format(DateTime::W3C)); $dd->add(new DateInterval('PT17H12M')); print_r($dd->format(DateTime::W3C)); var_dumpt($dd->format('\P\TH\Hi\M') === 'PT1712M');

preferences:
52.34 ms | 402 KiB | 5 Q