PHP echo and print Statements

echo() and print() are language constructs in PHP, both are used to output strings. echo is marginally faster than print.

echo() can take multiple expressions whereas print cannot take multiple expressions.

Print return true or false based on success or failure whereas echo doesn’t return true or false.

Leave a Reply

Your email address will not be published. Required fields are marked *