update latest php version code example
Example 1: update to php 7.4
Add the ondrej/php PPA. Ubuntu: ...
Install PHP 7.4 and required extensions. To install PHP 7.4 core. ...
PHP 7.4 for web: ...
Uninstall old PHP versions: ...
Verify PHP 7.4 installation
Example 2: update php version windows
Take a backup of your htdocs and data folder (subfolder of MySQL folder), reinstall upgraded version and replace those folders.
Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.