3v4l.org

run code in 300+ PHP versions simultaneously
<?php $w = date("w"); $morning = (date("H") < 9 || (date("H") == 9 && date("i") <= 15)) ? true : false; if ($w == 4) { $addDays = ($morning) ? 0 : 1; } else if ($w == 5) { $addDays = ($morning) ? 1 : 2; } else if ($w == 6) { $addDays = 3; } else if ($w == 0) { $addDays = 2; } else { $addDays = ($morning) ? 1 : 2; } var_dump($w); var_dump($morning); var_dump($addDays);
Output for git.master, git.master_jit, rfc.property-hooks
string(1) "4" bool(false) int(1)

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