note 45743 deleted from function.str-pad by danbrown
| From: | danbrown@php.net | Date: | Sat, 02 Jul 2011 18:56:29 +0000 |
| Subject: | note 45743 deleted from function.str-pad by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181198@lists.php.net to get a copy of this message | ||
Note Submitter: giorgio dot balestrieri at mail dot wind dot it
----
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... :)