3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Fake data $data = [ ['start' => '2022-11-03'], ['start' => '2022-11-04'], ['start' => date('Y-m-d')], ]; $now = new DateTime(); foreach($data as $records) { $start = new DateTime($records['start']); $diff = $start->diff(new DateTime()); // Convert days and hours to minutes, and sum them all up to get total // diff in minutes $minutes = ($diff->days * 24 * 60) + ($diff->h * 60) + ($diff->i); echo $start->format('Y-m-d H:i') . " was " . $minutes . " minutes ago\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
2022-11-03 00:00 was 3202 minutes ago 2022-11-04 00:00 was 1762 minutes ago 2022-11-05 00:00 was 322 minutes ago

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