How can I get the path of the PHP binary from PHP?

Viewed 52101

How can I get the binary path of php from PHP?

I saw it in phpinfo(), but I need another method that gets it in Linux and Windows systems.

9 Answers

As of PHP 5.4 you can simply use the PHP_BINARY reserved constant.

Related