note 130400 added to function.version-compare

From: Date: Tue, 01 Jul 2025 18:07:09 +0000
Subject: note 130400 added to function.version-compare
Groups: php.notes 
Request: Send a blank email to php-notes+get-222252@lists.php.net to get a copy of this message
While + is typically used to append metadata that are not supposed to be accounted for version comparison, the PHP version_compare function will actually consider that it decreases the version (by less than the least significant number) so: ``` version_compare('1.0.0+something', '1.0.0', '>=') ``` will return false ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 185.159.157.200) ---- Manual Page -- https://php.net/manual/en/function.version-compare.php Edit -- https://main.php.net/note/edit/130400 Del: integrated -- https://main.php.net/note/delete/130400/integrated Del: useless -- https://main.php.net/note/delete/130400/useless Del: bad code -- https://main.php.net/note/delete/130400/bad+code Del: spam -- https://main.php.net/note/delete/130400/spam Del: non-english -- https://main.php.net/note/delete/130400/non-english Del: in docs -- https://main.php.net/note/delete/130400/in+docs Del: other reasons-- https://main.php.net/note/delete/130400 Reject -- https://main.php.net/note/reject/130400 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#222252) next »