Question about The PHP Group PHP
Echo is marginally faster than print, and print returns a value, echo does not.
Echo allows comma separated arguments which it will concatenate. Print accepts only a single argument, but this is hardly a deal-breaker, because you can concatenate with a dot anyway.
Echo does not have a place in the precedence table, which means you can't use it in a complex expression.
That said ... for most cases, the major significant difference is:
Echo is quicker to type :)
Posted on Nov 26, 2008
Print outputs a single string, echo can output multiple strings. (It's in the help file.)
Posted on Sep 10, 2008
Tips for a great answer:
Dec 10, 2010 | The PHP Group PHP
on Jul 18, 2010 | Compilers & Programming Tools
Jan 25, 2010 | The PHP Group PHP
Jun 27, 2009 | Microsoft Compilers & Programming Tools
Mar 19, 2009 | The PHP Group PHP
Mar 17, 2009 | The PHP Group PHP
Feb 26, 2009 | The PHP Group PHP
Jan 18, 2009 | The PHP Group PHP
Sep 09, 2008 | The PHP Group PHP
Jul 27, 2008 | The PHP Group PHP
Oct 06, 2016 | The PHP Group PHP
1,845 people viewed this question
Usually answered in minutes!
Step 2: Please assign your manual to a product: