Re: forward compatibility "public" in 4.4
| From: | Stephan Schmidt | Date: | Thu, 16 Jun 2005 08:55:54 +0000 |
| Subject: | Re: forward compatibility "public" in 4.4 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16719@lists.php.net to get a copy of this message | ||
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. Just my 2 cts, Stephan