Let's say I have some project on php. One of its functions should be to check whether the latest version of php is used on the server. For example, for security reasons. There are no problems to use phpversion() and version_compare().
But how can I programmatically get the latest stable version of php? Maybe there is some kind of API or something like that?
- you need to get the latest release number of php using php itself;
- HTML parsing is not suitable;
- CLI or not — doesn't matter;
- it would be cool (but not necessary) to check the latest release within one major branch.
I am curious whether you had such a task and how you solved it.
This question is only about the software implementation of checking for updates, but not the update process itself.