Update PHP.php

Check for a PHP_BINARY environment variable before using the pre-defined constant.
Merge pull request #1051 from JoelMarcey/3.7

Update PHP.php
Merge branch '3.7'