3v4l.org

run code in 300+ PHP versions simultaneously
<?php $transactions = array( '111-11111' => '05:50:07', '211-21111' => '06:02:58', '241-21311' => '06:43:00', '255-26711' => '07:58:00' ); list($hour, $minutes, $seconds) = explode(':', array_shift($transactions)); $first = (new DateTime())->setTime($hour, $minutes, $seconds); $endtime = $first->add(new DateInterval('PT1H')); foreach ($transactions as $key => $time) { list($hour, $minutes, $seconds) = explode(':', $time); $datetime = (new DateTime())->setTime($hour, $minutes, $seconds); printf("Transaction ID: %s, Date/Time: %s, Within an hour: %s<br>\n", $key, $time, ($datetime < $endtime ? 'Yes' : 'No') ); }
Output for git.master, git.master_jit, rfc.property-hooks
Transaction ID: 211-21111, Date/Time: 06:02:58, Within an hour: Yes<br> Transaction ID: 241-21311, Date/Time: 06:43:00, Within an hour: Yes<br> Transaction ID: 255-26711, Date/Time: 07:58:00, Within an hour: No<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:
54.37 ms | 401 KiB | 8 Q