|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-01-14 09:24 UTC] xiemaomao520 at 163 dot com
-Summary: When use anonymous function in class property has
leak memory
+Summary: When use anonymous function in class property have a
memory leak
[2016-01-14 09:24 UTC] xiemaomao520 at 163 dot com
[2016-01-15 06:02 UTC] bwoebi@php.net
-Status: Open
+Status: Not a bug
-Package: PDO Core
+Package: Scripting Engine problem
[2016-01-15 06:02 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 15:00:01 2026 UTC |
Description: ------------ Affect all PHP versions. Test script: --------------- <?php class A { public function __construct () { $this->call = function () { }; } public function __destruct() { echo 'Destruct: ' . get_class($this) . PHP_EOL; } } class B { public function __destruct() { echo 'Destruct: ' . get_class($this) . PHP_EOL; } } function test() { new A; new B; } test(); echo "Exit\n"; Expected result: ---------------- Destruct: A Destruct: B Exit Actual result: -------------- Destruct: B Exit Destruct: A