[thelist] php form

MarsHall evolt at marsorange.com
Fri Nov 22 11:06:01 CST 2002


On Friday, Nov 22, 2002, at 10:54 US/Central, Dougal Campbell wrote:
> For the most part, there's no differences. But there are a few *subtle*
> differences where print will work, and echo will not. See the PHP
> manual
> for details and examples:
>   http://www.php.net/manual/en/function.echo.php
>   http://www.php.net/manual/en/function.print.php

In fact, there currently is NO DIFFERENCE between print() and echo().
The subtle difference you speak of is in regards to Variable Functions,
which is actually an error in the PHP documentation! See:
http://bugs.php.net/bug.php?id=16739

They are synonyms for the same construct. Your choice. Consistency in
your own code should be top priority. So, pick one and stick to it.

Also, both echo and print function without parenthesis around their
argument.

Mars :)




More information about the thelist mailing list