Stefan Weiss wrote:
> PS, a little off-topic: PHP is probably the worst language to work with in
> this regard. It will happily allow implicit multi-level creation in arrays
> -
>
> // ($foo is unused up to this point)
> $foo["bar"][13]["baz"] = "qux";
This is so very useful. (No sarcasm.)
> - but will emit E_NOTICE (a type of error)
A common misonception. It is a kind of debug message instead and can be
suppressed in various ways.
> if we try to read a nonexistent index ($foo["x"]).
^^^^^
The proper term is _key_, and if you write
@$foo["x"]
the notice will go away without any extra configuration.
F'up2 comp.lang.php
--
PointedEars (ZCE PHP)
FAQ: <
http://PointedEars.de/faq> | SVN: <
http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <
http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.