ببینید کارتون راه میوفته؟
http://askubuntu.com/questions/761713/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04
http://askubuntu.com/questions/50344/how-to-have-two-version-of-php-installed-and-switch-easily
http://stackoverflow.com/questions/10607849/is-there-an-easy-way-to-switch-php-versions-while-developing