Updated string tests
| From: | Justin Patrin | Date: | Tue, 28 Feb 2006 20:14:29 +0000 |
| Subject: | Updated string tests | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-23162@lists.php.net to get a copy of this message | ||
I've updated my string tests to include HEREDOC, sprintf, and curly
braces. It turns out that curly braces are actually slower than direct
double quotes (at least in eval tests). And HEREDOC is far slower than
" or ' for literal strings and slower than " when outputting
variables.
http://pear.reversefold.com/strings/
I ran these tests on PHP 5.0.5. If others like to run this on other
PHP versions, please send me the output of the script as an HTML file
and note what version of PHP, how you ran it (CLI/Apache/IIS), what
operating system, and what speed/CPU your machine is. If you get
results for any of the tests which is <1s (including the first literal
tests) please increase $iterations.
--
Justin Patrin