Minimum required version of PHP

Check the minimum required version of PHP and fix automatic choose the language.