Doc #80503 [Opn->Ver]: version_compare throws ValueError on invalid comparison operator in 8.0.0
Edit report at https://bugs.php.net/bug.php?id=80503&edit=1
ID: 80503
Updated by: cmb@php.net
Reported by: john at zerocrates dot org
Summary: version_compare throws ValueError on invalid
comparison operator in 8.0.0
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: PHP options/info functions
PHP Version: 8.0.0
Block user comment: N
Private report: N
New Comment:
Documenting all ValueErrors is work in progress[1].
It also needs to be documented that abbreviations of the allowed
operators are also supported; an empty string is the abbreviation
of '<'; or maybe that is a bug?
[1] <https://github.com/php/doc-en/pull/163>
Previous Comments:
------------------------------------------------------------------------
[2020-12-10 22:20:37] john at zerocrates dot org
Description:
------------
The documentation (just recently updated to include the information about version_compare returning
null on an invalid comparison operator in prior versions, from doc bug #77838), doesn't mention
the new behavior of the function in 8.0.0: it throws ValueError instead.
This also should possibly be mentioned as an incompatible change in the migration to 8.0.0 document.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80503&edit=1
Thread (8 messages)