From 2b7eb0e26a1816a3c5ddb28dd53f98ae0ecef047 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 13 Dec 2020 19:00:51 +0100 Subject: Disallow version_compare() $operator abbreviations `version_compare()` does a sloppy check for the `$operators` argument which allows arbitrary abbreviations of the supported operators to be accepted. This is both undocumented and unexpected, and could lead to subtle BC breaks, if the order of the comparisions will be changed. Therefore we change to strict comparisons. Closes GH-6510. --- UPGRADING | 3 +++ 1 file changed, 3 insertions(+) (limited to 'UPGRADING') diff --git a/UPGRADING b/UPGRADING index c1d4e564c4..a8ae9feeee 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,6 +19,9 @@ PHP 8.1 UPGRADE NOTES 1. Backward Incompatible Changes ======================================== +- Standard: + . version_compare() no longer accepts undocumented operator abbreviations. + ======================================== 2. New Features ======================================== -- cgit v1.2.1