Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16694 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81972 invoked by uid 1010); 15 Jun 2005 16:01:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81930 invoked from network); 15 Jun 2005 16:01:05 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 15 Jun 2005 16:01:05 -0000 X-Host-Fingerprint: 84.148.168.213 p5494A8D5.dip0.t-ipconnect.de Received: from ([84.148.168.213:25254] helo=localhost.localdomain) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 78/39-20931-DB050B24 for ; Wed, 15 Jun 2005 12:01:03 -0400 Message-ID: <78.39.20931.DB050B24@pb1.pair.com> To: internals@lists.php.net Date: Wed, 15 Jun 2005 18:09:00 +0200 User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050614) MIME-Version: 1.0 References: <42B03CF6.9000000@php.net> <20050615171433.22b4deb0.pierre@dotgeek.org> <83.47.20931.45940B24@pb1.pair.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 84.148.168.213 Subject: Re: [PHP-DEV] forward compatibility "public" in 4.4 From: lists@sebastianmendel.de (Sebastian Mendel) Stanislav Malyshev wrote: > SM>>IMHO is 'var' the only thing that produces NOTICES in PHP 5 what can > SM>>not be changed if this app should run in both Versions 4 and 5, > SM>>others, like '= new' and '=& new' can easily be adopt by just removing > SM>>the '&' without getting any NOTICE in any VERSION > > Here's something I am missing - if you say notices are so much rpoblem, > why not remove them? oh, PHP introduced NOTICEs so that i remove them? great ... > SM>>i think 'var' is the most important reason for the current delay in the > SM>>move to PHP 5! > > Eh? Why is that? Is it so hard to write one one-line script that would > replace ALL vars to publics? no but this so changed app could not run on both versions at the current state i can run one Server with both versions, accessing with different virtual hosts the same script ones interprated by PHP 5 and on the other vhost with PHP 4, but with Notices enabled i get overhelmed by 'var is deprecated' > SM>>i would even go a step further: > SM>> > SM>>-"var" { > SM>>+("var"|"public"|"private"|"protected") { > > Ouch. So you could write code that would run on PHP4 perfectly well and > break on PHP5? this can be done already, just to mention overwriting $this, or changing a copy of an object in PHP 4 changes the original object in PHP 5 also, this all three are 'silent' changes - that reports no errors but can break the app but this are all errors that can be fixed without getting notices in both versions but work in both versions -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet