Re: PHP 4.0 Bug #5641: php module fails to release memory
| From: | Stanislav Malyshev | Date: | Tue, 18 Jul 2000 15:02:01 +0000 |
| Subject: | Re: PHP 4.0 Bug #5641: php module fails to release memory | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-24951@lists.php.net to get a copy of this message | ||
RL>> Are we talking about the same script here? The script you sent was:
RL>>
RL>> <?php
RL>> $a="0123456789";
RL>> for($i=0;$i<21;$i++)$a.=$a;
RL>> print strlen($a);
RL>> unset($a);
RL>> ?>
RL>>
RL>> Surely the length of this string is only 210 characters. I suppose you
RL>> meant to have two nested loops here?
No it is not. After first loop $a becomse 20 characters. Next $a .= $a
makes it 40 characters. That's exponential growth.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665