/bin/bash: php: command not found

hello, I want to add a script that shows up my IP etc. <?phperror_reporting(0);$ip = `curl -s ifconfig.me`;$ip = trim($ip - Pastebin.com however even without any script I see such error "php command not found". it works for me in Terminal (php installed correctly). what to do now?