Re: ZE2 / PHP 5 BC breaking suggestion
| From: | Manuzhai | Date: | Tue, 11 Jun 2002 10:45:54 +0000 |
| Subject: | Re: ZE2 / PHP 5 BC breaking suggestion | ||
| References: | 1 2 3 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-5524@lists.php.net to get a copy of this message | ||
Using $bla[whatever] won't be deprecated inside "", will it?
Manuzhai
"Andi Gutmans" <andi@zend.com> wrote in message
news:5.1.0.14.2.20020610233003.03b42990@127.0.0.1...
> At 10:22 PM 6/10/2002 +0200, Melvyn Sopacua wrote:
> >At 20:35 10-6-2002, Andi Gutmans shared with all of us:
> >
> >>This is something which can't be broken because too many people use
> >>$a[foo] instead of $a['foo']. It'd kill a huge amount of web sites.
> >
> >Hmm, I see.
> >I suppose (?<=\[)\w+(?=\]) as an exeption to accomodate those errors
would
> >be too hard on the parser?
>
> Adding such an exception to the parser is definitely a no-no.
>
> Andi
>
>
> >>Andi
> >>
> >>At 09:29 PM 6/9/2002 +0200, Melvyn Sopacua wrote:
> >>>Hi,
> >>>
> >>>I know it's BC-breaking, but frankly - I do think it should be changed.
> >>>
> >>>The following:
> >>><?php
> >>>if(UNDEFINED_CONSTANT)
> >>>{
> >>> //do stuff
> >>>}
> >>>?>
> >>>
> >>>will result in do stuff being executed.
> >>>
> >>>I think it should be changed. Technically, anything not within quotes
is
> >>>not a string. PHP however defaults to the string type when the
> >>>characters are not in get_defined_constants().
> >>>
> >>>This leads to unexpected behavior and people that do know, need to
code:
> >>>if(defined('SETTING_TRUE') && SETTING_TRUE))
> >>>
> >>>which defeats using a constant in the first place.
> >>>
> >>>Comments please - especially if you know of a widely used php-package,
> >>>which will break when this is changed.
> >>>
> >>>Met vriendelijke groeten / With kind regards,
> >>>
> >>>IDG.nl
> >>>Melvyn Sopacua
> >>>Webmaster
> >>>
> >>>
> >>>--
> >>>PHP Quality Assurance Mailing List
> >>><http://www.php.net/>
> >>>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >>
> >>
> >>
> >>---
> >>Incoming mail is certified Virus Free.
> >>Checked by AVG anti-virus system (http://www.grisoft.com).
> >>Version: 6.0.370 / Virus Database: 205 - Release Date: 5-6-2002
> >
> >Met vriendelijke groeten / With kind regards,
> >
> >IDG.nl
> >Melvyn Sopacua
> >Webmaster
>