Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:19904 php.internals:19905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25257 invoked by uid 1010); 4 Nov 2005 08:40:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25242 invoked from network); 4 Nov 2005 08:40:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2005 08:40:10 -0000 X-Host-Fingerprint: 217.20.119.125 adviser.com NetCache 5.3-5.5 Received: from ([217.20.119.125:54366] helo=smtp.adviser.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B1/3B-19819-A6E1B634 for ; Fri, 04 Nov 2005 03:40:10 -0500 Received: from [195.244.96.14] (helo=[192.168.100.239]) by smtp.adviser.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52 (FreeBSD)) id 1EXx79-0009V2-My; Fri, 04 Nov 2005 09:39:59 +0100 Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <81D9588B-8984-432C-91CB-9ECE28F573F0@thieso.net> Cc: Thies Arntzen Content-Transfer-Encoding: 7bit Date: Fri, 4 Nov 2005 09:35:08 +0100 To: internals@lists.php.net X-Mailer: Apple Mail (2.746.2) mewhen anyhow, but not now). so, in one sentence: as we don't protect against recustion elsewhere, can we please remove this unneded roadblock? opinions? -thies From: thies@thieso.net ("Thies C. Arntzen") hey, in zend_object_handlers.c function zend_std_read_property we protect against calling the __get function of an object if we're already in a __get() function. (look for zobj->in_get) in that function. i don't think we should be doing this. simplyfied example: name); } } } $a = new test; var_dump($a->length); ?> outputs: __get(length) int(0) but should say: __get(length) __get(name) int(4) i think recursive gets are highly useful and should be allowed. if we really want to protect against recursion (here) we have two real options: -a- protect against __get(ing) the same property more than once in the same call-chain (mucho work), or -b- (preferred) have some global infinite recursion protection in the engine (needs to be done somewhen anyhow, but not now). so, in one sentence: as we don't protect against recustion elsewhere, can we please remove this unneded roadblock? opinions? -thies