Back to Developer Roadmap

print

src/data/roadmaps/php/content/[email protected]

4.0569 B
Original Source

print

The 'print' statement in PHP is an in-built function used for outputting one or more strings. Unlike 'echo', it is not a language construct and has a return value. However, it is slower because it uses expressions. The text or numeric data that 'print' outputs can be shown directly or stored in a variable. For instance, to print a string you may use print("Hello, World!");, and for using it with a variable, echo $variable; is suitable.

Visit the following resources to learn more: