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?
pandplstand 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_comparefunction. Most strings are evaluated lower than a number, and the absence of a number (such as the third position in1.6) is evaluated to the number 0. However,pandplare evaluated higher than a number. Therefore, if you start with version1.6, and you'd like to release a patch version for1.6with the intent of releasing1.6.1in the future, your patched version should be labeled1.6.0-pl. Otherwise,1.6.1will be seen as older than1.6-pl.