[thelist] php form

MarsHall evolt at marsorange.com
Fri Nov 22 11:26:00 CST 2002


On Friday, Nov 22, 2002, at 11:04 US/Central, MarsHall wrote:
> In fact, there currently is NO DIFFERENCE between print() and echo().

I lied ;)

In the nitty-gritty details, print() can act like a function, because
it will set a return value. So, this works:

	$foo = print "Hello World!";

while doing the same with echo():

	$foo = echo "Hello World!";

would NOT set $foo.

Although, to me they are synonyms! I can't imagine where I would use
that function-like behaviour of print().

Mars :)




More information about the thelist mailing list