note 45743 added to function.str-pad
| From: | giorgio dot balestrieri at mail dot wind dot it | Date: | Thu, 16 Sep 2004 21:06:09 +0000 |
| Subject: | note 45743 added to function.str-pad | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76846@lists.php.net to get a copy of this message | ||
str_pad vs. sprintf 2nd round :)
After to have seen Rex and Squeegee results, I've ran the code again, using different OSs and
PHP version.
Here my results:
OpenBSD & PHP 4.3.4
str_pad test started, please wait...
str_pad cycle completed in 88 seconds
sprintf test started, please wait...
sprintf cycle completed in 69 seconds
Windows XP & PHP 5.0.0
str_pad test started, please wait...
str_pad cycle completed in 33 seconds
sprintf test started, please wait...
sprintf cycle completed in 27 seconds
RedHat Linux 7.3 & PHP 4.3.3
str_pad test started, please wait...
str_pad cycle completed in 63 seconds
sprintf test started, please wait...
sprintf cycle completed in 43 seconds
sprintf seem to be faster yet, but considering Rex and Squeegee test, this cannot be considered
always true... somebody want try more? Only to understand why... :)
----
Manual Page -- http://www.php.net/manual/en/function.str-pad.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45743
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45743&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45743&report=yes
Search -- http://master.php.net/manage/user-notes.php