note 88821 added to language.references
| From: | bytepirate at osu1 dot php dot net | Date: | Mon, 09 Feb 2009 22:00:17 +0000 |
| Subject: | note 88821 added to language.references | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150427@lists.php.net to get a copy of this message | ||
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)
----
Server IP: 69.147.83.197
Probable Submitter: 87.184.49.40
----
Manual Page -- http://www.php.net/manual/en/language.references.php
Edit -- https://master.php.net/note/edit/88821
Del: integrated -- https://master.php.net/note/delete/88821/integrated
Del: useless -- https://master.php.net/note/delete/88821/useless
Del: bad code -- https://master.php.net/note/delete/88821/bad+code
Del: spam -- https://master.php.net/note/delete/88821/spam
Del: non-english -- https://master.php.net/note/delete/88821/non-english
Del: in docs -- https://master.php.net/note/delete/88821/in+docs
Del: other reasons-- https://master.php.net/note/delete/88821
Reject -- https://master.php.net/note/reject/88821
Search -- https://master.php.net/manage/user-notes.php