Path: csiph.com!feeder.erje.net!1.eu.feeder.erje.net!news.unit0.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript,comp.lang.php Subject: Re: not "autovivification", but ...? Followup-To: comp.lang.php Date: Thu, 02 Jun 2016 02:16:42 +0200 Organization: PointedEars Software (PES) Lines: 31 Message-ID: <6429329.X1ROTxqqWj@PointedEars.de> References: <1dc7bd11-343d-4cbb-b75d-1db8516666a0@googlegroups.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1464826603 9578 eJwFwQEBACAIA7BKIv/VOILQP4IbXaZcEAU2O4BLxn6jhOONhT6vq+8WY9rOGFbEmhbprg8g8BEG (2 Jun 2016 00:16:43 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 2 Jun 2016 00:16:43 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkBwDAIA0BLZQ2ByuH1L2F3eiksA5XQ1UWmjQPd4RE65KQFSp6NvQZucE9/dXL4xDqmQu3z4yuk/3XQFgI= Cancel-Lock: sha1:gggBjVtQ4pq5ymOiBC5WN2CZfz0= X-NNTP-Posting-Host: eJwNxsEBwAAEA8CZECnriNp/hPZel0GjHjCJvDxcj2TlOZyGO7b6CjtQgdxopf2P9XdGHxsYEUI= Xref: csiph.com comp.lang.javascript:30602 comp.lang.php:16754 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: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.