Always return PHP_BINARY when using a PHAR bundle by thomasplevy · Pull Request #5672 · wp-cli/wp-cli
This PR adds a check to the get_php_binary() utility method so that when running wp-cli as a PHAR bundle the wp --info command will always output the shell's current PHP version.
Fixes #5615
I believe this is a safe method of determining whether or not the wp-cli binary is a PHAR or not but if there's a preferred or better method I'll switch this to that.
Existing tests pass and I didn't add any new ones due to the usage of the constant.