We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb4c3cd commit 1bcc55cCopy full SHA for 1bcc55c
php-version.sh
@@ -3,12 +3,12 @@
3
declare -a php_versions
4
5
version=$(php -v | grep -o -e "PHP [0-9+]\.[0-9+]" | cut -d " " -f2)
6
-php_versions=($(brew ls --versions | grep -e "^php" | cut -d " " -f2 | grep -o -e "[0-9+]\.[0-9+]" | xargs))
+php_versions=($(brew ls --versions | egrep "^php(\ |@)" | cut -d " " -f2 | grep -o -e "[0-9+]\.[0-9+]" | xargs))
7
8
if [ -z "$1" ]; then
9
php_versions=$(printf ", %s" "${php_versions[@]}")
10
11
- echo "Usage: $0 <version>"
+ echo "Usage: $(basename $0) <version>"
12
echo "PHP Versions: ${php_versions:2}"
13
exit 0
14
fi
0 commit comments