Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23089 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81652 invoked by uid 1010); 2 May 2006 20:22:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81637 invoked from network); 2 May 2006 20:22:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 May 2006 20:22:54 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:42423] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 98/18-05123-C9FB7544 for ; Tue, 02 May 2006 16:22:53 -0400 Received: from baumbart.mbo (dslb-084-063-048-057.pools.arcor-ip.net [84.63.48.57]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id EACD635C1B7; Tue, 2 May 2006 22:22:48 +0200 (CEST) Date: Tue, 2 May 2006 22:22:53 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <6310340374.20060502222253@marcus-boerger.de> To: php internals Cc: Edin Kadribasic In-Reply-To: <4450D6BB.2060007@emini.dk> References: <444E0854.2000804@emini.dk> <200604251602.42837.bu@orbitel.bg> <444E2108.8050203@iamjochem.com> <749874265.20060426211537@marcus-boerger.de> <444FDF4C.4020303@emini.dk> <1421874376.20060427151948@marcus-boerger.de> <4450D6BB.2060007@emini.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Static properties From: helly@php.net (Marcus Boerger) Hello Folks, Edin and me discussed the issue a bit more in detail and shared memories of discussions from the original php 5.0 development. As a conclusion we came to the idea that we should revive the idea of a 'strict flag' that decides whether member variables (both static and non static) can be added on the fly by simply using them or not. This would for example look like this: strict class FooBar { } $obj = new FooBar; $obj->baz = 1; // E_ERROR (a fatal non recoverable error level) class MyConfig { } MyConfig::$allow_public_access = 1; // works pretty well Both of us thought this would be a great solution and should suit everybody in the php world. Also the possible slowdown would be not measurable since it is only a single integer check that in some cases won't have and influence on runtime at all. Any thoughts? Anybody? best regards marcus Thursday, April 27, 2006, 4:35:39 PM, you wrote: > Hi Marcus, > Marcus Boerger wrote: >> There was no endless discussion like we to often do on the list but instead >> it was just something we came to agree upon among those implementing it >> while implementing it. > In other words there was no public discussion whatsoever ;) > Well since we're are talking about the future direction of PHP, I guess > the question deserves some attention. I strongly disagree with this > approach of making PHP more "strict" and static. I really liked its > dynamicity and would not like to see it disappear under the pressure > from people who think Java or C++ (or any other langauge) are cool. For > me *PHP* is the cool language. > I would really like to hear what do PHP group members/core developers > think about this. >>>class foo{}; foo::$bar = 1; >> >> To cut the story short, any feature might have an advantage for somebody but >> also a heavy disadvantage for somebody else. But in the end if we'd agree to >> add this feature we#d also end up in supporting interception of static >> properties which we probably do not want. > Mike has already demonstrated that the patch to implement this > particular feature is very simple: > http://dev.iworks.at/PATCHES/dyn_static.txt > Edin Best regards, Marcus