Detect broken versions of PHP and recompile

Unfortunately updating Zlib (#26) breaks currently installed php versions. This checks an installed PHP version works correctly by ensuring `php -i` returns a zero exit code. 

If a non zero exit code is returned the existence check is failed and the version will be reinstalled.