You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
390 B
23 lines
390 B
8 years ago
|
#
|
||
|
# Exposes information about the PHP environment via the $php_info associative
|
||
|
# array.
|
||
|
#
|
||
|
# Authors:
|
||
|
# Taufek Johar <taufek@gmail.com>
|
||
|
#
|
||
|
|
||
|
local version
|
||
|
|
||
|
# Clean up previous $php_info.
|
||
|
unset php_info
|
||
|
typeset -gA php_info
|
||
|
|
||
|
if (( $+commands[php] )); then
|
||
|
version="${${$(php --version)[(w)1,(w)2]}/ /-}"
|
||
|
fi
|
||
|
|
||
|
# Format version.
|
||
|
if [[ -n "$version" ]]; then
|
||
|
php_info[version]="$version"
|
||
|
fi
|