#36672 [Opn->Fbk]: Function Call in IF ( ) with empty code block causes memory leak

From: Date: Thu, 09 Mar 2006 19:44:15 +0000
Subject: #36672 [Opn->Fbk]: Function Call in IF ( ) with empty code block causes memory leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94108@lists.php.net to get a copy of this message
ID: 36672 Updated by: mike@php.net Reported By: treehousetim at gmail dot com -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Windows PHP Version: 5.1.2 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Not reproducible on Linux. Previous Comments: ------------------------------------------------------------------------ [2006-03-09 16:01:17] treehousetim at gmail dot com Description: ------------ Empty if that calls a function that returns a value causes php to consume huge amounts of memory (at least under windows) This was tested using CLI Reproduce code: --------------- function testIt() { return true; } for ( $ix = 0; $ix < 200000; $ix++ ) { echo "Jere is the Memory King $ix" . NL; if ( testIt() ) { } } Expected result: ---------------- php's memory usage to remain somewhat stable. Actual result: -------------- php's memory usage goes up at the rate of about one meg per second while this script is running. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36672&edit=1

« previous php.bugs (#94108) next »