What is the difference between Echo and Print? - ProProfs Discuss
Advertisement

What is the difference between Echo and Print?

Asked by G. GRAY, Last updated: Mar 29, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

C.Charlotte

C.Charlotte

C.Charlotte
C.Charlotte

Answered Mar 02, 2020

The echo and Print are used in order to ensure that output will be available on the screen. While there may be some differences, the differences are actually small. The echo does not have any return value, while print will have a return value of 1 so that it will be ready to be used for expressions.
There are times when echo can be used for multiple parameters, but there are also times when print can only use parameters. If you would like to know which one is faster, echo is known to be faster as compared to print. You will know which one is used because echo will create a newline at the end of the output.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.