How to change php versions like 7.2 to 7.4 ?
 Important note while change php version one two another
My current php version php 7.2 in terminal
but when i check using phpinfo() function it display php7.4
so the same version setup check below step it's a very useful process for doing this.
| step 1 fire this command and change php version php 7.2 to php 7.4
 sudo update-alternatives --config php
 | 
| step2check php version and restart the apache2
 - php -v
 -sudo service apache2 restart
 | 
| step3enable previous version using a2dimod and a2enmod command and apache2 restart
 -sudo a2dismod php7.2
 -sudo a2enmod php7.4
 -sudo sudo service apache2 restart
 | 
| step4check php version in using phpinfo() function and terminal
 |