Re: coding standards - draft

From: Date: Fri, 28 Dec 2001 20:49:48 +0000
Subject: Re: coding standards - draft
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969340437@lists.php.net to get a copy of this message
> > I talked about ${} and not {$}. ${} also works, at > > least in some cases. And it is in the docs. Is this > > an inconsistency in PHP? > > Regarding inconsistency, I've never used ${} for this and don't see any > docs that mention this syntax for arrays in strings. The docs do mention > {$} syntax though. *shrugs* Not sure what to think :) > > ${} does not work for 3d arrays, {$} does. Both work for 2d. 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 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... Goba

« previous php.doc (#969340437) next »