Re: associative arrays: usage inside double-quoted strings: documentation gap

From: Date: Sat, 10 Mar 2001 00:37:26 +0000
Subject: Re: associative arrays: usage inside double-quoted strings: documentation gap
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-12147@lists.php.net to get a copy of this message
On Fri, 9 Mar 2001, Lars Torben Wilson wrote: > Jeroen van Wolffelaar writes: > > Note that one of the examples in the real doc uses this syntax! > > (in http://www.php.net/manual/en/language.types.array.php) > > $a[3]['bar'] = 'Bob'; > > echo "This will work: " . $a[3][bar]; > > > > But you're right, this should not work, because it can be ambibious. > > Well, it should work--it is just bad practice. When someone comes > along and isn't using quotes and does something like $arr[default] we > invariably get questions because 'default' is a keyword and it screws > up the script. > > > If i make an update for that page, will it be committed? I understand > > Probably. Do you have a copy of the doc sources? Nope, but I'm since 1 minute member of that phpdoc ml. How can i obtain it? > > you don't have the time (for now) to do it yourself, while these > > Yeah, but there are a bunch of folks working on the docs, so someone > would get to it. I already somehow had the idea that php wasn't the work of only one person ;-) Should i adress myself to that list? Or isn't anyone working on this right now/in the very near future? > > basic-syntax things are IMHO quite important to be documented correctly, > > even > > more because it is quite strange how this behaves. > > > > The curly brace behavior is even worse documented. > > Yup. Jeroen van Wolffelaar Jeroen@A-Eskwadraat.nl http://www.A-Eskwadraat.nl/~jeroen

« previous php.notes (#12147) next »