Re: Re: #46251 [Opn->WFx]: Array type documentation, error in example
| From: | Daniel Convissor | Date: | Thu, 06 Nov 2008 02:52:19 +0000 |
| Subject: | Re: Re: #46251 [Opn->WFx]: Array type documentation, error in example | ||
| References: | 1 2 3 4 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969379640@lists.php.net to get a copy of this message | ||
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
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409