3v4l.org

run code in 300+ PHP versions simultaneously
<?php $curtime = '2350'; var_dump($curtime); $trading_hour['AT_open'] = '1715'; $trading_hour['AT_close'] = '2345'; $result = 'N'; if ($curtime <= '0100' || ($curtime >= '0830' && $curtime <= '2359')) { $isOverMidnight = false; $AT_close = $trading_hour['AT_close']; if ($AT_close > '2359') { $isOverMidnight = true; $AT_close = $AT_close - '2400'; $AT_close = sprintf('%04d', $AT_close); } if ($isOverMidnight) { if ($curtime <= $AT_close || ($curtime >= $trading_hour['AT_open'] && $curtime <= '2359')) { $result = 'AT1'; } } else { if ($curtime >= $trading_hour['AT_open'] && $curtime <= $AT_close) { $result = 'AT2'; } } echo $result; } else { echo 'stop'; }
Output for git.master, git.master_jit, rfc.property-hooks
string(4) "2350" N

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