Re: coding standards - draft
| From: | Philip Olson | Date: | Fri, 28 Dec 2001 21:20:44 +0000 |
| Subject: | Re: coding standards - draft | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969340438@lists.php.net to get a copy of this message | ||
> Why there are two ${} and {$} ???? See
>
> http://www.php.net/manual/en/language.types.string.php#language.types.string
> .parsing for the examples.
>
> Simple syntax
>
> echo "He drunk some ${beer}s"; // works
This makes sense as $beers is not a set variable. {$beer}s works too
though, seems okay that both work. Anyway, this isn't an array ;-))
> Complex Syntax
>
> echo "You can even write {$obj->values[3]->name}";
>
> Don't know why there is a simple syntax for that... ${} if there
> is a {$}. This is just to confuse people, like me... There are
> some things explained there about ${} problems with more
> complex expressions. The docs says, this is why {$} exists...
> Huh...
Not sure. I'm not real familiar with language_scanner and the like, so,
will say this: "Variety is the spice of life" :) As is, the examples in
the string section could be organized a bit better.
Regards,
Philip Olson