3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_magic($n, $arr = [1, 2, 10]) { return $n === $arr[0] || $n === ($arr[0] + $arr[1]) || ($n % $arr[2]) === ($arr[0] + $arr[1]); } $r = []; foreach([1, 3, 23, 32, 41, 54, 63] as $k => $n) { $r[$k] = is_magic($n); } var_dump($r);
Output for git.master, git.master_jit, rfc.property-hooks
array(7) { [0]=> bool(true) [1]=> bool(true) [2]=> bool(true) [3]=> bool(false) [4]=> bool(false) [5]=> bool(false) [6]=> bool(true) }

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