3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startTime = "5:00AM"; $endTime = "8:00AM"; $startTime = new DateTime($startTime); $endTime = new DateTime($endTime); $now = new DateTime(); if ($now >= $startTime && $now < $endTime) { echo "Time now ({$now->format('h:i a')}) is between start ({$startTime->format('h:i a')}) and end ({$endTime->format('h:i a')}) times"; } else { echo "Time now ({$now->format('h:i a')}) is NOT between start ({$startTime->format('h:i a')}) and end ({$endTime->format('h:i a')}) times"; }
Output for git.master, git.master_jit, rfc.property-hooks
Time now (01:34 pm) is NOT between start (05:00 am) and end (08:00 am) times

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