The PHP handler is written into the .htaccess file. The .htaccess file is a hidden file that is read by the web server. The web server follows any instructions contained within the file. There are many ways to access this file. For the purposes of this article, we will explain accessing it through the File Manager on the cPanel of your hosting account.

Once you have saved the file, you can close it. Your account will then use the PHP version you selected.
Available PHP Handlers
The following handlers can be copied and pasted directly into your .htaccess file:
PHP 5.4
# Use PHP5.4 as default
AddHandler application/x-httpd-php54 .php
PHP 5.4 Single php.ini
# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php
PHP 5.4 FastCGI
# Use PHP54CGI as default
AddHandler fcgid54-script .php
PHP 5.6
# Use PHP5.6 as default
AddHandler application/x-httpd-phpbeta .php
PHP 5.6 Single php.ini
# Use PHP5.6 Single php.ini as default
AddHandler application/x-httpd-phpbetas .php
PHP 5.6 FastCGI
# Use PHP54CGI as default
AddHandler fcgidbeta-script .php
PHP 7.0
# Use PHP7 as default
AddHandler application/x-httpd-php70 .php
PHP 7.0 Single php.ini
# Use PHP7 Single php.ini as default
AddHandler application/x-httpd-php70s .php
PHP 7.0 FastCGI
# Use PHP70CGI as default
AddHandler fcgid70-script .php