Kirby version detection best practices

I wonder what would be best practices for determining the kirby version in a project/site?

App::version() returns a string like “5.1.2" that I would have to parse.

Thus, wouldn’t it be nice to have a function like App::versionId() that returns an integer like 50102 (just like PHP_VERSION_ID) so that I can use numerical comparison to check if a specific version fits my needs?

What do you think?

I don’t use that function so I cannot 100% confirm but isn’t version_compare() exactly for that purpose, to compare two semver-style version strings?

Thanks for the hint, did had that in mind! Seems to be worth a detailed check …