Home >Backend Development >PHP Problem >What does php print mean?
php print is a language structure used to output one or more strings, and print is not actually a function, so there is no need to use parentheses for it, and "print" is better than "echo" in php Slightly slower.
php print
php print is a language structure used to output one or more String. print is not actually a function, so you don't have to use parentheses with it.
Example 1
<?php $str = "Who's John Adams?"; print $str; print "<br />"; print $str."<br />I don't know!"; ?>
Output:
Who's John Adams? Who's John Adams? I don't know!
Example 2
<?php print "This text spans multiple lines."; ?>
Output:
This text spans multiple lines.
print() function is better than echo() Slightly slower.
The above is the detailed content of What does php print mean?. For more information, please follow other related articles on the PHP Chinese website!