3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=[1=>1,2=>3]; $b=[1=>2,6=>7]; echo ($a < $b ? "a < b\n" : ""); echo ($a > $b ? "a > b\n" : ""); echo ($a == $b ? "a == b\n" : ""); echo ($a != $b ? "a != b\n" : ""); echo ($a < $b || $a >= $b ? "" : "a <> b\n"); if (version_compare(PHP_VERSION, "7.0", ">=")) { eval('echo "a <=> b is ", ($a <=> $b), "\n";'); } $c=[2=>3,1=>1]; $d=[6=>7,1=>2]; echo ($c < $d ? "c < d\n" : ""); echo ($c > $d ? "c > d\n" : ""); echo ($c == $d ? "c == d\n" : ""); echo ($c != $d ? "c != d\n" : ""); echo ($c < $d || $c >= $d ? "" : "c <> d\n"); if (version_compare(PHP_VERSION, "7.0", ">=")) { eval('echo "c <=> d is ", ($c <=> $d), "\n";'); }
Output for git.master, git.master_jit, rfc.property-hooks
a < b a != b a <=> b is -1 c != d c <> d c <=> d is 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:
57.59 ms | 401 KiB | 8 Q