Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / maintenance / dev / includes / php.sh
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
6
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
12 fi
13 fi
14 done