3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r(array( version_compare("6.0-beta1", "6.0-beta2"), version_compare("6.0-beta2", "6.0-rc1"), version_compare("alpha10", "rc1"), version_compare("beta5", "alpha1"), ));
based on O1UDC
Output for 5.2.4 - 7.2.0
Array ( [0] => -1 [1] => -1 [2] => -1 [3] => 1 )
Output for 4.3.0 - 5.2.3
Array ( [0] => -1 [1] => 1 [2] => 1 [3] => 1 )