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

后端 未结 3 939
轻奢々
轻奢々 2021-02-20 14:54

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

3条回答
  •  清酒与你
    2021-02-20 15:19

    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.

提交回复
热议问题