[thelist] [php] print and echo (was: php forms)

shawn allen shawn at alterior.net
Fri Nov 22 13:09:01 CST 2002

quoth DESCHAMPS Stéphane DvSI/SICoR:
> I seem to prefer echo(), someone explianed the reason to me a long
> time ago and I found it convincing enough to stop using print. I guess
> it's got something to do with future deprecation and coherence of code
> (all other functions being ()'d).

If you're used to perl or C, you'll probably be more comfortable with
print. Also, I'd like to point out that neither print nor echo are
functions, they're /language constructs/. I don't see the use of either
without parens being "deprecated" any time soon... the Zend folks have
much more important things to work on (like the OO implementation) than
making code appear more "coherent".

Besides, a lot of people leave off the parens for the /purpose/ of
distinguishing print, include, and require constructs from other

And as for the differences between the two (besides those stated in the
manual): <http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40>

shawn allen

More information about the thelist mailing list