Add support for HHVM in the getting of the PHP executable

This commit is contained in:
Joel Marcey 2013-11-22 14:02:48 -08:00 committed by Fabien Potencier
parent a1ae7033c9
commit 539de177ca

View File

@ -33,6 +33,11 @@ class PhpExecutableFinder
*/
public function find()
{
// HHVM support
if (($hhvm = getenv("PHP_BINARY")) !== false) {
return $hhvm;
}
// PHP_BINARY return the current sapi executable
if (defined('PHP_BINARY') && PHP_BINARY && ('cli' === PHP_SAPI) && is_file(PHP_BINARY)) {
return PHP_BINARY;