Home>Article>Backend Development> What does php echo mean?

What does php echo mean?

藏色散人
藏色散人 Original
2019-05-30 11:39:48 9222browse

What does php echo mean?

What does php echo mean?

echo in PHP is not a function (it is a language structure), so you do not have to use parentheses to specify parameters, single quotes or double quotes are fine. echo (unlike other language constructs) does not behave like a function, so it cannot always be used in the context of a function. In addition, if you want to pass multiple parameters to echo, you cannot use parentheses.

Basic usage of echo:

echo also has a shortcut usage, you can use an equal sign directly before opening the mark. Before PHP 5.4.0, short_open_tag must be enabled in php.ini to be effective.

For example:

I have  foo.

The main difference from print is that echo accepts a parameter list and has no return value.

Parameter arg1, the parameter to be output

Return value: No return value.

In short, php echo outputs strings or variables, similar to print in C language, and belongs to the grammatical structure of php.

The above is the detailed content of What does php echo mean?. 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