Re: Handling TRUE,FALSE,NULL,ON,OFF, etc
Andrei Zmievski <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 07 Apr 2004, Mark Rogers wrote:
> messju mohr writes:
> > Tagnames, modifiers and variable-names are all case-sensitive. I see
> > nothing wrong with "true", "null" etc. also being case-sensitive and
> > only accepted in lowercase.
>
> PHP would disagree with you, in as much as TRUE/FALSE/NULL are valid in PHP,
> even though $x and $X are different. (I know we're talking about Smarty
> syntax, though, not PHP.)
PHP's case-insensitivity sucks. You should see the amount of effort that
goes into making sure that PHP 5 internals still maintain BC in this
area.
> Regarding modifiers,
> {"xx"|STRTOUPPER} works (ie using a PHP function)
> whereas
> {""|DEFAULT:"YY"} doesn't.
No, please don't advocate this.
> Given all of this, is there really a good reason _not_ to accept
> TRUE/FALSE/NULL/ON/OFF etc? The performance impact is negligible (and only
> to the compiler).
Is there a really good reason to accept them?
- Andrei
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php