---
layout: default
title: WP_CLI::get_php_binary()
description: "Get the path to the PHP binary used when executing WP-CLI."
---

<small><a href="/docs/">Docs</a> &raquo; <a href="/docs/internal-api/">Internal API</a> &raquo; System</small>

## WP_CLI::get_php_binary()

Get the path to the PHP binary used when executing WP-CLI.

***

### Usage

    WP_CLI::get_php_binary()

<div>
<strong>@return</strong> (string) <br />
</div>


***

### Notes

Environment values permit specific binaries to be indicated.


*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.*


***

### Related

<ul>



<li><strong><a href="/docs/internal-api/wp-cli-utils-get-temp-dir/">WP_CLI\Utils\get_temp_dir()</a></strong> - Get the system's temp directory. Warns user if it isn't writable.</li>



</ul>


