symfony/symfony — pull request #9583 by JoelMarcey (2013-11-22 22:27:29+00:00)
Title: Add support for HHVM in the getting of the PHP executable

Check for a PHP_BINARY environment variable before using the pre-defined PHP_BINARY constant.

HHVM has an explicit hhvm binary and a wrapper to mimic php functionality. We were running into issues with tests that ran in their own process where using the hhvm binary does not handle php code sent to it via stdin very well. We get "Nothing to do...pass file" exceptions. Unfortunately, the PHP_BINARY is always set to the explicit binary (the php wrapper is basically a symlink to the explicit binary). So, we thought about adding a check for a PHP_BINARY environment variable as the first choice when getting the PHP binary.