Is there a better console for PHP than running in interactive mode

≡放荡痞女 提交于 2019-12-04 03:20:30

The Interactive Shell will be improved in PHP 5.4.

See http://schlueters.de/blog/archives/133-Now-in-trunk-Improved-interactive-shell.html

Improved CLI Interactive readline shell (Johannes)

  • Added cli.pager ini setting to set a pager for output.
  • Added cli.prompt ini settingto configure the shell prompt.
  • Added shortcut #inisetting=value to change ini settings at run-time.
  • Don't terminate shell on fatal errors.

An alternative would be http://phpsh.org/

phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation. It was developed at Facebook and ironically, is written mostly in python. It is open source and released under a modified BSD license.

Justin just gave a talk on the interactive shell Psysh at OSCON which appears to be an improved version of phpsh.

https://github.com/bobthecow/psysh

Never tried, but http://david.acz.org/phpa/ sounded promising. The page also lists two alternatives which might be worth to investigate. There were also some musings that the builtin php -a was refurbished in php-trunk/5.4. So maybe try the SVN version (at least it supports non-ASCII input).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!