Re: Re: #46251 [Opn->WFx]: Array type documentation, error in example

From: Date: Thu, 06 Nov 2008 05:04:43 +0000
Subject: Re: Re: #46251 [Opn->WFx]: Array type documentation, error in example
References: 1 2 3 4 5  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969379641@lists.php.net to get a copy of this message
2008/11/5 Daniel Convissor <danielc@analysisandsolutions.com>: > On Tue, Nov 04, 2008 at 11:40:34PM +0100, Hannes Magnusson wrote: >> >> I think the "Wont fix" was due to the fact you can do $foo[] = >> "value"; without initializing $foo = array() without getting any >> notices or difference then initializing it beforehand. >> >> Although we shouldn't be advocating such coding we still should >> document it - adding (like the bug reporter correctly pointed out) >> register_global issues note.. > > If using an uninitialized $foo[] = 'value' syntax goes into the > documentation, a comment should be put above it explaining the dangers of > doing so. > > --Dan Hi Dan, That's exactly the issue--the example was used uninitialized. It's been that way for a long time. It has now been changed so that the example initializes the array before populating it. Torben

« previous php.doc (#969379641) next »