which

To find the path of the application, you can use the which command, followed by the executable that you would have run.

Example:

which php/usr/local/bin/php