What is difference between echo and print in PHP?

Written by Vincent

Posted On: Jan 09, 2019


    1 Answer Written

  •  Vincent
    Posted by Mathewaider

     There are small difference between Echo and Print in PHP. 

     These are - 

    1. Echo has no return value while Print has a return value of 1.
    2. Echo is marginally faster in comparison of Print.
    3. Echo can output one are more strings while Print can output only 1 string.
    4. Echo is a language constructor while Print is a function.

Please Login or Register to leave a response.

Related Questions

PHP Interview Questions

What is mvc in PHP?

MVC stands for Model View Controller. It is an application design pattern for software development that separates the application data and business logic (model) from the presentation (view)....