locate the .bashrc file in the users home account.
Add an alias
alias php='/path/to/bin/php'
logout and log back in to check that php -v now shows the correct php version
alternatively, you can set multipl aliases
ex:
alias php71='/usr/local/cwp/php71/bin/php'
alias php72='/usr/local/cwp/php72/bin/php'
Then just run "php71 file.php"