3v4l.org

run code in 300+ PHP versions simultaneously
<?php function new_new_version_compare($a, $b){ return explode(".", $a) <=> explode(".", $b); } $versions = ["2.5.1", "2.5.2", "2.5.5", "2.5.11"]; $versus = "2.5.2"; foreach ($versions as $version) { printf("%s -v- %s = %s\n", $version, $versus, new_new_version_compare($version, $versus)); }
Output for git.master, git.master_jit, rfc.property-hooks
2.5.1 -v- 2.5.2 = -1 2.5.2 -v- 2.5.2 = 0 2.5.5 -v- 2.5.2 = 1 2.5.11 -v- 2.5.2 = 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:
28.97 ms | 401 KiB | 8 Q