How can I create a bash script that detects version of php, disable it then shift to the another without telling it which one to . I work with ZF2 and some detailed errors fail to show while using php 7 but when I shift to php5.6 I m able to see them well in the browser.
I'm able to change php mod by doing sudo a2enmod php7 or php5.6 and also doing sudo a2dismod. someone please help automate this process using a single script so that I just run it once then it disables the current mod and enable the other. thanks in advance.