3v4l.org

run code in 300+ PHP versions simultaneously
<?php $end_date = new DateTime(date("Y-m-d H:i:s", strtotime("14:00"))); $begin_date = new DateTime(date("Y-m-d H:i:s", strtotime("09:15"))); echo "begin_date is " . $begin_date->format('Y-m-d H:i:s') . " and end_date is " . $end_date->format('Y-m-d H:i:s') . "<br>"; $diff = ($end_date)->diff($begin_date); $diff_in_hours = $diff->h + $diff->i / 60; echo "The difference is " . $diff->h . " hours and " . $diff->i . " minutes, which is " . $diff_in_hours . " hours<br>";
Output for git.master, git.master_jit, rfc.property-hooks
begin_date is 2014-11-07 09:15:00 and end_date is 2014-11-07 14:00:00<br>The difference is 4 hours and 45 minutes, which is 4.75 hours<br>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
31.63 ms | 401 KiB | 8 Q