在
the documentation for the interactive shell,Ryan P.的第一个音符有一些值得注意的信息:
原文链接:https://www.f2er.com/php/133481.htmlInteractive Shell and Interactive Mode are not the same thing,despite the similar names and functionality.
If you type
PHP -a
and get a response of ‘Interactive Shell’ followed by aPHP>
prompt,you have interactive shell available (PHP was compiled with readline support). If instead you get a response of ‘Interactive mode enabled’,you DO NOT have interactive shell available and this article does not apply to you.
因此,如果您只启用“交互模式”,那么您将只能输入PHP代码,然后在完成后,发送PHP EOF来执行它.
这可能不是你想要的.您可能想要查看phpsh.