3v4l.org

run code in 200+ PHP versions simultaneously
<?php $v = '1.2.3 (59eda4e)'; var_dump(version_compare($v, $v)); var_dump(version_compare($v, $v, '<')); $v = '1.2.3 [59eda4e]'; var_dump(version_compare($v, $v)); var_dump(version_compare($v, $v, '<')); $v = '1.2.3 59eda4e'; var_dump(version_compare($v, $v)); var_dump(version_compare($v, $v, '<'));
based on ONosZ
Output for 4.3.0 - 7.4.1
int(-1) bool(true) int(-1) bool(true) int(0) bool(false)