# Patch for version_compare() to fix bug #21611

- Thread: https://externals.io/message/3720
- Original archive: https://news-web.php.net/php.internals/3720
- Started by Stefan Walk on 2003-08-04T18:41:09+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3720 — Stefan Walk — 2003-08-04T18:41:09+00:00

URL: https://externals.io/message/3720#3720

Hello,

Attached is a patch that makes `version_compare()` treat versions such as
4.0.1p1 like 4.0.1pl1. I know this version suffix isn't used by PHP, but
there were some problems because PEAR packages used it, and i don't see
any problem with `version_compare()` handling non-php versions as well.
(Afaik, the "alpha" and "beta" suffixes are also not used, but they are
in version_compare).

-- 
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de
