Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37330 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4271 invoked from network); 30 Apr 2008 05:40:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2008 05:40:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=robert@interjinn.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=robert@interjinn.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain interjinn.com from 66.11.173.122 cause and error) X-PHP-List-Original-Sender: robert@interjinn.com X-Host-Fingerprint: 66.11.173.122 unknown Received: from [66.11.173.122] ([66.11.173.122:56348] helo=interjinn.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/EA-28930-C3608184 for ; Wed, 30 Apr 2008 01:40:12 -0400 Received: from [192.168.1.3] (blobule.suds [192.168.1.3]) by interjinn.com (Postfix) with ESMTP id BA30211FB75; Wed, 30 Apr 2008 01:40:07 -0400 (EDT) To: Stanislav Malyshev Cc: internals@lists.php.net In-Reply-To: <481801F3.9070901@zend.com> References: <48169695.9040803@omegavortex.net> <27A086AB-E111-49C1-ABBD-28FB6E1677BD@procata.com> <48175A65.4070301@zend.com> <1209512914.7057.296.camel@blobule> <10845a340804291714g7eb10362m17af4abecbadf0e4@mail.gmail.com> <7dd2dc0b0804291801m627a7c31h8dd796d7fa1d1257@mail.gmail.com> <1209518549.7057.313.camel@blobule> <7dd2dc0b0804292051o4fd5e77eu6f8faecad93c378a@mail.gmail.com> <1209528338.7057.349.camel@blobule> <4817FFAE.10409@zend.com> <1209532608.7057.371.camel@blobule> <481801F3.9070901@zend.com> Content-Type: text/plain Organization: InterJinn Date: Wed, 30 Apr 2008 01:40:09 -0400 Message-ID: <1209534009.7057.379.camel@blobule> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Class Properties in Interfaces? From: robert@interjinn.com (Robert Cummings) On Tue, 2008-04-29 at 22:21 -0700, Stanislav Malyshev wrote: > > But then you need to check if it exists lest you raise an E_NOTICE > > because it doesn't exist. Additionally, E_NOTICE is run-time, interface > > checking is compile-time. > > I don't understand what you mean here. PHP can't check variable accesses > compile-time. In fact, in PHP "compile-time" doesn't mean much anyway, > since everything is runtime. Oh, I'm sorry, perhaps I should have said parse time-- either way PHP does compile an internal bytecode so compile-time is not incorrect. Obviously interface errors are detected when the script is parsed NOT when the code itself is run. if PHP can check method definition compliance when the script is parsed, surely it can check property definition compliance also. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP