3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time[1] = "2017-08-28 18:30:00"; $time[2] = "2017-08-28 14:00:00"; $time[3] = "2017-08-28 13:00:00"; $time[4] = "2017-08-28 12:45:00"; $time[5] = "2017-08-28 12:30:00"; $time[6] = "2017-08-28 12:00:00"; for ($i = 1; $i <= count($time) - 1; $i++) { $hourdiff = round((strtotime($time[$i + 1]) - strtotime($time[$i]))/3600, 1); echo "The difference is: $hourdiff" . PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
The difference is: -4.5 The difference is: -1 The difference is: -0.3 The difference is: -0.3 The difference is: -0.5

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:
156.56 ms | 405 KiB | 5 Q