How to switch to a different PHP version with htaccess

To switch to PHP 7.1

To switch to PHP 7.0

To switch to PHP 5.6

To switch to PHP 5.5

To switch to PHP 5.4

To switch to PHP 5.3

 

This setting will apply recursively to all of the subdirectories. In case you’d like to have a different version of PHP in a subdirectory, create a new .htaccess file in it with the directive for the desired PHP version in it.