Re: forward compatibility "public" in 4.4

From: Date: Thu, 16 Jun 2005 09:27:00 +0000
Subject: Re: forward compatibility "public" in 4.4
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-16721@lists.php.net to get a copy of this message
Stephan Schmidt wrote: > Hi, > > Lukas Smith wrote: >> I think its a good idea to have, to make it somewhat possible to >> prepare for the PHP5 E_STRICT world, while still developing PHP4 >> compatible code. I could for example see this help increase the PHP5 >> adoption inside PEAR, since this would allow us to make some packages >> E_STRICT compatible without throwing out PHP4 compatibility (inside >> PEAR we consider increased major PHP versions to be a BC break, but >> not minor versions). > > Will this still work in PHP 4.4 as it did in 4.3 if you apply the patch? > > function public($foo) { > var_dump($foo); > } > public(42); > > I guess, this will more likely produce an error message like this: > > Parse error: syntax error, unexpected T_PUBLIC, expecting T_STRING in > public.php on line 2 > > So I'm strongly against this change. If you want to run PHP4 code in > PHP5, disable E_STRICT. id dont know, but isnt there a difference between where the keywords are placed? and if it is so, then this would also be a candidate for "NOTICE: 'public' is a keyword in PHP 5" in php 4.4 -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet

« previous php.internals (#16721) next »