You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: version_compare() — shorter operand must compare like Zend (ext/standard/versioning.c) #4796
Cleanup: deleting leftover test/tmp/ scratch repro for this closed issue — same coverage lives under test/compliance/cases/ (see PR chore/cleanup-stale-test-tmp-repros).
Category
stdlibProblem
version_compare()inext/standard/VmInfo.phpdiverges from Zend when one operand has fewer dotted segments (e.g.8.2vs8.2.31).php-src reference
ext/standard/versioning.c—php_version_compare(),php_canonicalize_version()Repro
test/tmp/repro-version-compare-partial.php:./script/docker-exec.sh -- bash -lc 'php test/tmp/repro-version-compare-partial.php; php bin/vm.php test/tmp/repro-version-compare-partial.php'version_compare('8.2.31', '8.2', '>=')truefalseScope
ext/standard/VmInfo.php(phpVersionCompare/canonicalizeVersion)lib/JIT/Builtin//__compiler_version_compareif duplicatedtest/compliance/cases/stdlib/version_compare_partial.phptDone when
./script/ci-fast.sh --filter version_compare_partialgreenRelated
$operatormust beValueErrorversion_compare()subset