Home  >  Article  >  Backend Development  >  echo 和print有哪些异同?

echo 和print有哪些异同?

WBOY
WBOYOriginal
2016-06-06 20:40:101399browse

就像以前大家喜欢讨论include和require一样,现在貌似比较流行比较print和echo.我也就此向大家咨询一下这两者有什么异同?

自己先回答一个
相同点:
1.都是语言结构

不同点:
1.echo 支持多个参数,print只支持一个。

抛砖引玉

回复内容:

就像以前大家喜欢讨论include和require一样,现在貌似比较流行比较print和echo.我也就此向大家咨询一下这两者有什么异同?

自己先回答一个
相同点:
1.都是语言结构

不同点:
1.echo 支持多个参数,print只支持一个。

抛砖引玉

哈哈,可能这问题太简单了,没人回答。
echo 比print 更快

echo 命令和 print 命令 相同,没有区别
echo 函数 和 print 函数 有区别。
echo() 无返回值,与echo 命令相同
print() 有返回值,成功,返1,false,返0.

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