note 88821 deleted from language.references by cmb
| From: | cmb@php.net | Date: | Sun, 01 Sep 2019 07:47:31 +0000 |
| Subject: | note 88821 deleted from language.references by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212066@lists.php.net to get a copy of this message | ||
Note Submitter: bytepirate
----
in additon to blakes comment. try this:
<?php
$strlen=60000;
$bstring=str_repeat("X",$strlen);
$astring=$bstring;
$starttime=microtime(true);
for($i=0;$i<=$strlen;$i++){
if($i==strlen($astring))
echo "End of String<br>";
}
echo (microtime(true)-$starttime)." seconds expired";
?>
and now change '$astring=$bstring;' to '$astring=&$bstring;'
on my system its 200 times slower with the reference.
increase $strlen and it gets even worse ;-)
(PHP 5.25 on UNIX)