2015-11-06 111 views

回答

5

如果您使用phpbrew可以使用ext install命令,就像這樣:

$ phpbrew ext install <provider>:<organization>/<repository> <tag|branch> 

例如:

# install imagic from 'phpseven' branch 
$ phpbrew ext install github:mkoppanen/imagick phpseven 

# install xdebug beta (compatible with PHP7) 
$ phpbrew ext install github:xdebug/xdebug XDEBUG_2_4_0beta1 

# install phalcon framework from 'phalcon-v2.0.8' tag 
$ phpbrew ext install github:phalcon/cphalcon phalcon-v2.0.8 

# install php-ast extension from master 
$ phpbrew ext install github:nikic/php-ast 

PS:我這樣做有助於保持phpbrew項目,我不是說這是實現你所問的唯一方法。但它肯定是嘗試擴展和php版本的最簡單方法之一,一旦你有你的環境設置:)