3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = new DateTime(); $d2 = new DateTime(); $d2->add(new DateInterval('PT30M')); $iv = $d2->diff($d1); var_dump( $iv );

preferences:
22.46 ms | 407 KiB | 5 Q