3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = ['7.2.0-RC2', '7.2.0', '7.2.1', '7.1.0-RC2', '7.1.0', '7.1.5', '5.6.3']; foreach ($a as $version) { echo $version."\n"; var_dump( version_compare($version, '7.2.0', '<'), version_compare($version, '7.1.999', '>') ); echo "\n\n"; } ?>
based on 8Xmts
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.1.10
7.2.0-RC2 bool(true) bool(true) 7.2.0 bool(false) bool(true) 7.2.1 bool(false) bool(true) 7.1.0-RC2 bool(true) bool(false) 7.1.0 bool(true) bool(false) 7.1.5 bool(true) bool(false) 5.6.3 bool(true) bool(false)