note 43501 deleted from function.echo by aidan

From: Date: Sun, 27 Jun 2004 13:54:49 +0000
Subject: note 43501 deleted from function.echo by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71901@lists.php.net to get a copy of this message
Note Submitter: jucrouzet _at_ cpan _dot_ org ---- 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. Editors note: The amount of time really is negligible. A 0.0035052299499512 time difference for 50,000 calls really is nothing. Very few (if any) scripts need be concerned about this.

« previous php.notes (#71901) next »