Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35972 invoked from network); 30 Apr 2008 19:25:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2008 19:25:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:57056] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/83-13507-997C8184 for ; Wed, 30 Apr 2008 15:25:15 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Apr 2008 22:26:06 +0300 Received: from [192.168.16.217] ([192.168.16.217]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Apr 2008 12:26:03 -0700 Message-ID: <4818C792.700@zend.com> Date: Wed, 30 Apr 2008 12:25:06 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Lars Strojny CC: internals@lists.php.net References: <48169695.9040803@omegavortex.net> <339714303.20080429114607@marcus-boerger.de> <4817596B.8020109@zend.com> <1209494001.31298.17.camel@localhost> <4818A615.9010905@zend.com> <1209582844.3784.20.camel@localhost> In-Reply-To: <1209582844.3784.20.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Apr 2008 19:26:03.0559 (UTC) FILETIME=[0790A370:01C8AAF8] Subject: Re: [PHP-DEV] Class Properties in Interfaces? From: stas@zend.com (Stanislav Malyshev) Hi! > With the substantial difference, that __get()/__set() does not work > properly with inheritance, as the language can't verify the LSP. Language never could verify the LSP. The developer should do it - the language has no idea of what pre/postconditions in your code are. Language can provide a tiny bit of LSP support - namely, method signatures, etc. - but that's it. > This means, Child behaves more strict than Mother and breaks the > principle. Well, don't write such code. :) > With advanced properties, the interpreter could at least verify that > getting/setting properties is not stricter in subclasses. How? For that you'd need the interpreter to actually understand what the code does. While I'd like to have such thing one day (provided it does not rebel and decide to kill all humans, of course ;) PHP interpreter is definitely not it. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com