3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_day = date('N'); // Current day of the week as a number (1-7) - Sunday is first day of the week $current_hour = date('H'); // Current hour in 24 hr format if($current_day < 6) { // Check if it's Monday - Friday if($current_hour > 1 && $current_hour < 9) { // time is between 1 and 9 AM $image = 'OPEN'; } elseif($current_hour > 9 && $current_hour < 18) { // time is between 9 am and 6 pm $image = 'OPEN'; } elseif($current_hour > 18 && $current_hour < 23) { // time is between 6 pm and 11 pm $image = 'CLOSED'; } else { // time is none of the above $image = 'CLOSED'; } } else { $image = 'NOTHING'; }
Output for git.master, git.master_jit, rfc.property-hooks

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