Blogger Information
Blog 36
fans 4
comment 3
visits 31908
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
7.22PHP中echo、print、print_r、var_dump的区别
大灰狼的博客
Original
687 people have browsed it

echo、print是PHP的语句,而print_r、var_dump是函数;


1、echo输出字符串,用逗号作为间隔符


2、print只能打印简单类型变量,有返回值,显示成功返回true,否则返回false


3、print_r可以打印复杂类型变量(数组、对象等)


4、var_dump会输出变量的类型、长度以及内容,所以常使用var_dump用于调试


待更新~

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post