Home >Backend Development >PHP Problem >What are the differences between php echo, print, print_r and var_dum?

What are the differences between php echo, print, print_r and var_dum?

藏色散人
藏色散人Original
2020-07-02 09:50:292719browse

php The differences between echo, print, print_r, and var_dum are: 1. echo and print are language structures, while print_r and var_dump are ordinary functions; 2. echo is used to output one or more strings; 3. Print is used to output strings and so on.

What are the differences between php echo, print, print_r and var_dum?

The difference between echo, print, print_r and var_dump

echo and print are language structures, print_r and var_dump is a normal function

  • echo: output one or more strings

  • print: output string

  • print_r: Print easy-to-understand information about variables

  • var_dump: Print easy-to-understand information about variables (with type)

For more related knowledge, please visit PHP Chinese website!

The above is the detailed content of What are the differences between php echo, print, print_r and var_dum?. For more information, please follow other related articles on the PHP Chinese website!

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
Previous article:What does PHP ZVAL mean?Next article:What does PHP ZVAL mean?