Re: coding standards - draft

From: Date: Fri, 28 Dec 2001 20:29:01 +0000
Subject: Re: coding standards - draft
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969340435@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. You wrote: > - use ${varname} for complex vars in strings, $varname[x] > will confuse readers, as this is illegal outside strings, > concatenation makes code unreadable I think you meant ${varname['x']} and if so, let's use {$varname['x']} syntax instead. But then again, I prefer $varname[x] in strings, as stated earlier. But, the confuse factor does exist so I vote .4 for both methods and .2 for concatenation ;) Regards, Philip Olson

« previous php.doc (#969340435) next »