有没有比以交互模式运行更好的 PHP 控制台

发布于 2024-11-03 04:05:13 字数 175 浏览 8 评论 0原文

有没有类似 for PHP 的东西?语法高亮并且在第一个异常时不让控制台退出到 shell 会很好。 :)

Is there something like for PHP? Syntax highlighting and not having the console exit to shell on the first exception would be nice to haves. :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

﹂绝世的画 2024-11-10 04:05:13

Justin 刚刚在 OSCON 上发表了关于交互式 shell Psysh 的演讲,它似乎是 phpsh 的改进版本。

https://github.com/bobthecow/psysh

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

泪是无色的血 2024-11-10 04:05:13

交互式 Shell 将在 PHP 5.4 中得到改进。

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

改进的 CLI 交互式 readline shell (Johannes)

  • 添加了 cli.pager ini 设置以设置用于输出的寻呼机。
  • 添加了 cli.prompt ini 设置以配置 shell 提示符。
  • 添加了快捷方式 #inisetting=value 以在运行时更改 ini 设置。
  • 不要因致命错误而终止 shell。

另一种选择是 http://phpsh.org/

phpsh 是 php 的交互式 shell,具有读取历史记录、制表符补全、快速访问文档等功能。它是在 Facebook 开发的,讽刺的是,它主要是用 python 编写的。它是开源的,并根据修改后的 BSD 许可证发布。

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.

初见终念 2024-11-10 04:05:13

从未尝试过,但 http://david.acz.org/phpa/ 听起来很有希望。该页面还列出了两种可能值得研究的替代方案。还有一些想法认为 php-trunk/5.4 中对内置的 php -a 进行了翻新。所以也许可以尝试一下 SVN 版本(至少它支持非 ASCII 输入)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文