php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46190 create_function memleak
Submitted: 2008-09-27 23:08 UTC Modified: 2008-09-28 00:58 UTC
From: vamphouse at yandex dot ru Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.6 OS: win32
Private report: No CVE-ID: None
 [2008-09-27 23:08 UTC] vamphouse at yandex dot ru
Description:
------------
create_function memleak

Reproduce code:
---------------
for($i = 0; $i < 1; $i ++ ){
	$s1 = memory_get_usage();
	$lambda = create_function('$hello', ' return "hello". ($hello); ');
	$lambda('Gordeev Yuri!');
	unset($lambda);
	$s2 = memory_get_usage();
}

print ($s2-$s1);


Expected result:
----------------
0

Actual result:
--------------
print ($s2-$s1); // 2232

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-28 00:58 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See the optional parameter, http://docs.php.net/memory-get-usage
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC