笔记本升级到了OS X 10.8了,但是偶尔还需要写点php调剂一下。看看自带的php版本?
PHP 5.3.13 with Suhosin-Patch (cli) (built: Jun 20 2012 17:05:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
对于追新族来说,必须得升级到php 5.4才开心。借助homebrew很快完成升级:
安装过程
两行即可。
brew tap josegonzalez/homebrew-php
brew install php54
这样安装的php路径在/usr/local/bin/php,版本信息:
/usr/local/bin/php -v
PHP 5.4.4 (cli) (built: Jul 27 2012 08:42:32)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies