Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29960 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34530 invoked by uid 1010); 30 May 2007 17:56:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34514 invoked from network); 30 May 2007 17:56:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2007 17:56:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=colder@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=colder@php.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 213.239.212.54 cause and error) X-PHP-List-Original-Sender: colder@php.net X-Host-Fingerprint: 213.239.212.54 dns1.omne-serveurs.net Linux 2.4/2.6 Received: from [213.239.212.54] ([213.239.212.54:48867] helo=dns1.omne-serveurs.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/77-20580-BCABD564 for ; Wed, 30 May 2007 13:56:28 -0400 Received: (qmail 18455 invoked from network); 30 May 2007 17:56:23 -0000 Received: from 80.218.249.160 by dns1 (envelope-from , uid 1004) with qmail-scanner-1.23 (clamdscan: 0.82. spamassassin: 3.0.1. perlscan: 1.32. Clear:RC:1(80.218.249.160):. Processed in 0.035453 secs); 30 May 2007 17:56:23 -0000 Received: from 80-218-249-160.dclient.hispeed.ch (HELO ?10.0.0.1?) (80.218.249.160) by dns1.omne-serveurs.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 30 May 2007 17:56:23 -0000 Message-ID: <465DBAC6.5080700@php.net> Date: Wed, 30 May 2007 19:56:22 +0200 User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: Stanislav Malyshev CC: internals@lists.php.net References: <465D8C6B.2000809@php.net> <465DB3A9.6010707@zend.com> In-Reply-To: <465DB3A9.6010707@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [patch] Callbacks bug/change request From: colder@php.net (Etienne Kneuss) Stanislav Malyshev wrote: >> It seems that there is a bug in the way some callbacks are handled. >> For instance: >> >> array('B', 'parent::who'); > > I'm not sure such thing should be even supported. I.e. I'd expect it > to try and call method named 'parent::who' in class B, which would > fail since you can't define such method name. Is there any reason why > anybody would really need anything like this? It's already supported, but buggy right now. I don't believe fixing it for odd cases will bother anyone. > >> According to Marcus, this is wrong, so here is two patches (+ tests) >> meant for HEAD [1] >> and the 5_2 branch (>5.2.3) [2]. >> >> Thanks for your consideration. > > First part of the patch changes EG(scope) even though no actual call > is made. I don't think you should change globals if you are not > intending to use them. If some value is needed which equals to > EG(scope) or other value depending on context, I think you should do > it with variable, not change the global, if possible. EG(scope) is used by zend_u_fetch_class to get the parent/current class, I'm only altering it temporarily before zend_u_fetch_class and restore it after that, no harm done. -- Etienne Kneuss http://www.colder.ch colder@php.net Men never do evil so completely and cheerfully as when they do it from a religious conviction. -- Pascal