The differences and usage between PHPecho, print, printf, and sprintf functions are described in detail. 1. echo function: output function, which is a command and cannot return values. Echo can be separated with multiple parameters by semicolons,
This article mainly analyzes the differences and usage between echo, print, printf, and sprintf functions in PHP. if you need some help, please refer to them.
1. echo function:
The output function is a command and cannot return values. Echo can be
1. Echo Function:
The output function, which is a command, cannot return a value. Echo can be followed by a number of parameters, separated by semicolons, such as:echo $myvar 1;Echo, $myvar, "bold";
2. Print function:
is a function that returns a
1. echo function:
The output function is a command and cannot return values. Echo can be followed by multiple parameters separated by semicolons, for example:Echo $ myvar1;Echo 1, 2, $ myvar, " bold ";
2. print function:
Yes. One value can be
1. Echo Function:The output function , which is a command, cannot return a value. Echo can be followed by a number of parameters, separated by semicolons, such as:echo $myvar 1;Echo, $myvar, "bold";2. print Function:is a function that returns a
1. Echo Function:
The output function, which is a command, cannot return a value. Echo can be followed by many parameters, separated by semicolons, such as:echo $myvar 1;Echo 1,2, $myvar, "bold";
2. Print function:
is a function that can return a
Start
I used to think that stringstream is far inferior to sprintf.
Recently, it suddenly sprouted to see if stirngstream is really as bad as I thought.
Body
Let's take a look at the comparison.
// Stringstream.
Stringstream
Start
I used to think that stringstream is far inferior to sprintf.
Recently, it suddenly sprouted to see if stirngstream is really as bad as I thought.
Body
Let's take a look at the comparison.
// Stringstream.
Stringstream
This article mainly analyzes the differences and usage between echo, print, printf, and sprintf functions in PHP. If you need some help, please refer to them.
This article mainly analyzes the differences and usage between echo, print, printf, and
1. Echo Function:The output function , which is a command, cannot return a value. Echo can be followed by a number of parameters, separated by semicolons, such as:Echo $myvar 1 Echo ,$myvar, "bold";2. print Function:is a function that returns a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.