Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11547 invoked from network); 28 Oct 2012 07:15:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2012 07:15:50 -0000 Authentication-Results: pb1.pair.com header.from=php@bof.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@bof.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: php@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:51326] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/63-18930-4ABDC805 for ; Sun, 28 Oct 2012 02:15:49 -0500 Received: (qmail 17360 invoked by uid 1009); 28 Oct 2012 08:15:45 +0100 Received: from 209.85.223.170 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/15514. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.223.170):. Processed in 0.101906 secs); 28 Oct 2012 07:15:45 -0000 X-Antivirus-MYDOMAIN-Mail-From: php@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.223.170):. Processed in 0.101906 secs Process 17352) Received: from mail-ie0-f170.google.com (gmail@bof.de@209.85.223.170) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 28 Oct 2012 08:15:45 +0100 Received: by mail-ie0-f170.google.com with SMTP id c12so6425280ieb.29 for ; Sun, 28 Oct 2012 00:15:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.213.73 with SMTP id nq9mr6545065igc.27.1351408543659; Sun, 28 Oct 2012 00:15:43 -0700 (PDT) Received: by 10.50.150.228 with HTTP; Sun, 28 Oct 2012 00:15:43 -0700 (PDT) Received: by 10.50.150.228 with HTTP; Sun, 28 Oct 2012 00:15:43 -0700 (PDT) In-Reply-To: <508C7F59.7000609@zerocue.com> References: <508A67E6.2000405@zerocue.com> <508C2267.2040205@zerocue.com> <1386509.9ZAIcfOWKR@rofl> <508C7F59.7000609@zerocue.com> Date: Sun, 28 Oct 2012 08:15:43 +0100 Message-ID: To: Clint Priest Cc: internals , Stas Malyshev Content-Type: multipart/alternative; boundary=14dae93405f330f65b04cd19522b Subject: Re: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability From: php@bof.de (Patrick Schaaf) --14dae93405f330f65b04cd19522b Content-Type: text/plain; charset=ISO-8859-1 Am 28.10.2012 02:42 schrieb "Clint Priest" : > > Sounds like you're implying that the mere existence of a properly named function such as __prop_get_hours() would cause it to be called instead of returning the property. Only when the property does not exist, just like it is with __get > 1) Currently __get() is only checked/invoked if there is not a property already defined; ie properties shadow __get() (no performance penalty) Right. I would expect / hope for __prop_get_XXX to work exactly the same. > 2) It would dramatically reduce performance because every property access would have to create the function string, get it's hash value and ..... But that only applies to an "accessor shadows property" doctrine, and that is one of these complications / complexity issues which makes me prefer the "property exists means it's definite" doctrine as already deployed with __get. best regards Patrick --14dae93405f330f65b04cd19522b--