3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isMarketOpen($timestamp) { //>Wed 11:32:10 EST $timezone = new DateTimeZone('EST'); $nowDate = new DateTime((string) $timestamp, $timezone); $marketCloseTime = new DateTime('5PM', $timezone); $marketOpenTime = new DateTime('8AM', $timezone); echo $marketOpenTime->format('Y-m-d H:i:s'); echo "\n"; echo $nowDate->format('Y-m-d H:i:s'); return ($nowDate > $marketOpenTime && $nowDate < $marketCloseTime); } isMarketOpen('Wed 07:32:10 EST');
Output for git.master, git.master_jit, rfc.property-hooks
2014-10-01 08:00:00 2014-10-01 07:32:10

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:
61.75 ms | 401 KiB | 8 Q