PHP 4.0 Bug #2179: Memory leak in foreach() with a return statement

From: Date: Sat, 28 Aug 1999 13:17:01 +0000
Subject: PHP 4.0 Bug #2179: Memory leak in foreach() with a return statement
Groups: php.dev 
Request: Send a blank email to php-dev+get-10291@lists.php.net to get a copy of this message
From: christophe.massiot@mail.dotcom.fr Operating system: LinuxPPC R5/Linux 2.2.10 PHP version: 4.0 Latest CVS (28/08/1999) PHP Bug Type: Scripting Engine problem Bug description: Memory leak in foreach() with a return statement The following script : <? function srv_isin($array, $pattern) { foreach ($array as $current) return; } //srv_isin srv_isin(array("meuh"), "meuh"); ?> produces : 15:18 [webase3:pts/11] salome:~/html% php test.php Content-Type: text/html test.php: Freeing 0x018FF2E8 (4 bytes), allocated in zend_hash.c on line 391<br> test.php: Freeing 0x018FF298 (35 bytes), allocated in zend_hash.c on line 380<br> test.php: Freeing 0x018FF258 (20 bytes), allocated in zend_hash.c on line 95<br> test.php: Freeing 0x018FF200 (44 bytes), allocated in zend_variables.c on line 131<br>

« previous php.dev (#10291) next »