說明在Ubuntu 10.04 Server版本中安裝phpsh。
獲取phpsh源,並提取
wget http://github.com/facebook/phpsh/zipball/master
sudo apt-get install unzip
mkdir temp
mv facebook-phpsh-8438f3f.zip temp
cd temp
unzip facebook-phpsh-8438f3f.zip
phpsh使用Python,安裝依賴
sudo apt-get install python-setuptools
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install build-essential
sudo apt-get install python-dev
sudo apt-get install sqlite3 libsqlite3-dev
sudo easy_install pysqlite
sudo apt-get install libncurses5-dev
sudo easy_install readline
設置phpsh,運行和看到的作品
sudo python setup.py install
phpsh
$a = array("a"=>1,"b"=>2);
print_r($a)
Phpsh交互式演練在這裏:http://stackoverflow.com/a/20451380/445131 – 2014-06-02 18:43:03