Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80410 invoked from network); 13 Jun 2009 11:18:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jun 2009 11:18:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=chris_se@gmx.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chris_se@gmx.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: chris_se@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Linux 2.6 Received: from [213.165.64.20] ([213.165.64.20:32958] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/00-14600-70B833A4 for ; Sat, 13 Jun 2009 07:18:32 -0400 Received: (qmail invoked by alias); 13 Jun 2009 11:18:28 -0000 Received: from p54A14DD4.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.77.212] by mail.gmx.net (mp007) with SMTP; 13 Jun 2009 13:18:28 +0200 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX1+AoFRWs2GA2HAWhGBPKRUdtspLV+JvD4ga1JCpHC /eMxbVjgEyDzIe Received: from [192.168.0.175] (HSI-KBW-082-212-059-033.hsi.kabelbw.de [82.212.59.33]) by chris-se.dyndns.org (Postfix) with ESMTP id 4AD176930; Sat, 13 Jun 2009 13:18:25 +0200 (CEST) Message-ID: <4A338AC9.1090100@gmx.net> Date: Sat, 13 Jun 2009 13:17:29 +0200 User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: Greg Beaver CC: PHP Developers Mailing List References: <4A3343A1.4060701@chiaraquartet.net> In-Reply-To: <4A3343A1.4060701@chiaraquartet.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 Subject: Re: [PHP-DEV] bug 48541 - critical for PHP 5.3 From: chris_se@gmx.net (Christian Seiler) Hi Greg, > I can do it if someone can answer this question: how do closures > uniquely identify themselves? spl_autoload_register is mistakenly > treating all closures as if they were a single copy of the static method > "Closure::__invoke", and so only the first registered closure is ever > called (plus it leaks the other closures at shutdown). If the system > can be made to better identify the closure, then spl_autoload_register > can use that (and also properly free the refcount on a dupe). A closure can only be uniquely identified by the object storage id the object has. You cannot assume any identity with regard to, for example, file name and line where it was defined, since one could imagine the following: foreach ($dirs as $dir) { spl_autoload_register (function ($class) use ($dir) { include $dir.'/'.$class.'.php'; }); } (or something like it) If nobody else does it I'll fix this later today. Regards, Christian