'Call the given PHP and return:
(<version>, <include_path>)
Returns (None, []) if could not determine.'

def _php_info_from_php(self, php, env):

    import process
    import tempfile
    marker = '---    Start    of    Good    Stuff    ---'
    info_cmd = (((('<?php    ' + ('echo("%s\\n");' % marker)) + 'echo(phpversion()."\\n");') + 'echo(ini_get("include_path")."\\n");') + '    ?>')
    argv = [php]
    envvars = env.get_all_envvars()
    php_ini_path = env.get_pref('phpConfigFile')
    if php_ini_path:
        envvars['PHPRC'] = php_ini_path
    (fd, filepath) = tempfile.mkstemp(suffix='.php')
    try:
        os.write(fd, info_cmd)
        os.close(fd)
        argv.append(filepath)
        p = process.ProcessOpen(argv, env=env.get_all_envvars())
        (stdout, stderr) = p.communicate()
    finally:
        os.remove(filepath)
    stdout_lines = stdout.splitlines(0)
    retval = p.returncode
    if retval:
        log.warn('failed    to    determine    PHP    info:\n        path:    %s\n        retval:    %s\n        stdout:\n%s\n        stderr:\n%s\n', php, retval, util.indent('\n'.join(stdout_lines)), util.indent(stderr))
        return (None, [])
    stdout_lines = stdout_lines[(stdout_lines.index(marker) + 1):]
    php_ver = stdout_lines[0]
    include_path = [p.strip() for p in stdout_lines[1].split(os.pathsep) if p.strip()]
    return (php_ver, include_path)
