Home >Backend Development >PHP Tutorial >如何在cli模式下输入并测试 多行php代码

如何在cli模式下输入并测试 多行php代码

WBOY
WBOYOriginal
2016-06-06 20:50:461192browse

如何在cli模式下输入并测试 多行php代码

回复内容:

如何在cli模式下输入并测试 多行php代码

PHP的CLI版本有提供一个 interactive shell (php -a), 如果编译的时候带上了readline的话。

felix021@ubserver:~$ php -a
Interactive shell

php > echo "123";
123
php > print 1 + 2;
3
php > 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn