github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/scriptpack/php/data/version.sh (about)

     1  # php_version_list lists the available PHP versions.
     2  #
     3  # This outputs the result as an array that can be `eval` back into bash.
     4  php_version_list() {
     5    list=(`apt-cache show php5 | grep Version`)
     6    for i in "${list[@]}"; do
     7      if [[ $i == "Version"* ]]; then
     8        list=(${list[@]/$i})
     9      fi
    10    done
    11  
    12    echo "${list[@]}"
    13  }