Re: ZE2 / PHP 5 BC breaking suggestion
| From: | Andi Gutmans | Date: | Mon, 10 Jun 2002 18:35:11 +0000 |
| Subject: | Re: ZE2 / PHP 5 BC breaking suggestion | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-5514@lists.php.net to get a copy of this message | ||
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.
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