如何使用PHP交互式外壳 [英] How to use the PHP interactive shell

查看:111
本文介绍了如何使用PHP交互式外壳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用64位Ubuntu 12.04,并且我想使用PHP交互式shell:

I'm using Ubuntu 12.04 64 bit and I want to use the PHP interactive shell:

php -a

但是它似乎不能很好地工作,很多语法被错误解释.

But it doesn't seem to work very well, a lot of syntax is incorrectly interpreted.

当我运行php -a时,它会显示:

When I run php -a it displays:

interactive mode enabled

只有一个光标闪烁.

我正在使用:PHP 5.4.13-2〜precise + 1(cli)(内置:2013年3月21日12:17:18)

I'm using: PHP 5.4.13-2~precise+1 (cli) (built: Mar 21 2013 12:17:18)

如何使用PHP交互式外壳?

How do I use the PHP interactive shell?

推荐答案

尝试安装 http://www.phpsh.org/这可能是最简单的解决方案.

Try installing http://www.phpsh.org/ it is probably the easiest solution.

步骤:(假设已安装依赖项)

  1. git clone https://github.com/facebook/phpsh
  2. cd phpsh
  3. sudo python setup.py install
  4. phpsh
  1. git clone https://github.com/facebook/phpsh
  2. cd phpsh
  3. sudo python setup.py install
  4. phpsh

这篇关于如何使用PHP交互式外壳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆