note 43501 added to function.echo
| From: | jucrouzet_at_cpan_dot_org at rn2 dot php dot net | Date: | Wed, 23 Jun 2004 11:33:17 +0000 |
| Subject: | note 43501 added to function.echo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71547@lists.php.net to get a copy of this message | ||
As an addition to <dannydannydanny at tranceaddict dot net>'s post:
There is a reason that echo is faster than print; print is a FUNCTION, implemented as a PHP
extention, and loaded via Zend API, who need to parse argument, pass them to the C function, which
does the output operation, etc...
echo is a "language construct", that means that PHP core parses it and does the output
operation alone, without any help of Zend API, that's why you can use it without parenthesis
(echo "test\n";), etc...
That's a thing to remember when you write a script that does a lot of printing operation, you
can save a lot of CPU time.
----
Manual Page -- http://www.php.net/manual/en/function.echo.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43501
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43501&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43501&report=yes
Search -- http://master.php.net/manage/user-notes.php