Merge "Update OOjs UI to v0.1.0-pre (fe4076af75)"
[mediawiki.git] / maintenance / dev / includes / php.sh
blob3c5bef0dd650a8cbf0e7d5ce8cade2e06f186df9
1 # Include-able script to determine the location of our php if any
2 # We search for a environment var called PHP, native php,
3 # a local copy, home directory location used by installphp.sh
4 # and previous home directory location
5 # The binary path is returned in $PHP if any
7 for binary in $PHP $(which php || true) "$DEV/php/bin/php" "$HOME/.mediawiki/php/bin/php" "$HOME/.mwphp/bin/php" ]; do
8 if [ -x "$binary" ]; then
9 if "$binary" -r 'exit((int)!version_compare(PHP_VERSION, "5.4", ">="));'; then
10 PHP="$binary"
11 break
14 done