An automatic upgrade Bash script requires PHP executable 5.3+, how do I ensure that is the case in the upgrade script? I'd like the script to quit and generate some message into the log when php 5.3+ is not available.
Update: the servers where I currently need this to work is Debian and in near future it'll be Ubuntu. Another assumption is that PHP are "standardly" installed.