You can use the command which, which shows
the full path of (shell) commands. Which finds the first binary within
path. If you have more than one binary in separate locations which will
report the one bash would execute first.
root@root [~]# which bash
/bin/bash
root@root [~]# which php
/usr/bin/php
/bin/bash
root@root [~]# which php
/usr/bin/php
