To downgrade PHP version you need to stop you webserver stop Apache service httpd stopthenyum...
To install mcrypt for PHP5.6run this command yum install php56-php-mcryptto install for PHP7run...