Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "pl" or "p" mean in a version number?

In PHP's version_compare function, pl or p are the only strings in a version number that are evaluated to be later than the numbered versions. Which means that when comparing version numbers,

1.5 < 1.6-beta < 1.6 < 1.6.1 < 1.6-pl

My question is, what does pl or p stand for in this context?

like image 639
Ben Miller - Remember Monica Avatar asked Jan 13 '23 12:01

Ben Miller - Remember Monica


1 Answers

p and pl stand for "patch" or "patch level."

The example version numbers that I gave in the question highlight a bit of a quirk with using PHP's version_compare function. Most strings are evaluated lower than a number, and the absence of a number (such as the third position in 1.6) is evaluated to the number 0. However, p and pl are evaluated higher than a number. Therefore, if you start with version 1.6, and you'd like to release a patch version for 1.6 with the intent of releasing 1.6.1 in the future, your patched version should be labeled 1.6.0-pl. Otherwise, 1.6.1 will be seen as older than 1.6-pl.

like image 69
Ben Miller - Remember Monica Avatar answered Feb 01 '23 04:02

Ben Miller - Remember Monica