It is important to keep PHP version up to date. Newer version will contain new features, bug fixes and security updates. There are three phases that a supported PHP version can be in: Active Support, Security Fixes Only, and End of Life (EOL). Currently supported versions and their phases can be found in PHP Supported Versions.
App Service recommendations
In App Service, PHP updates are installed side by side with the existing versions. You can check the Support Timeline and the OS support for existing versions.
Once a version of PHP has reached it’s end of life (EOL), it will no longer be available from Runtime Stack selection dropdown.
Existing applications configured to target a runtime version that has reached EOL should not be affected, although it is recommended to review the differences between PHP versions and migrate your application to the next supported version available.
Here are some recommendatios to take in consideration:
Select the PHP version you want to update from PHP Supported Versions.
composer installto install and update your application dependencies to their latest versions.
If you have a local environment, you can also check to ensure all PHP modules and settings are set properly for your application’s dependencies using the
Test your application and validate if your application is not throwing any error at startup or runtime phases.
It is recommended to follow the App Service deployment best practices to have an efficient deployment and migration update, as using deployment/stating slots for testing before switching to production. To update your app to target a different version of PHP in App Service (Linux), you can follow this article.
If you are using Azure DevOps, GitHub Actions or any other automation provider, make sure to change the PHP version in the pipelines to match the runtime version.
Redeploy your application and validate.
Always check for updates in PHP 8 ChangeLog to keep your applications secured.