Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.php Subject: Re: not "autovivification", but ...? Date: Fri, 03 Jun 2016 22:20:23 +0200 Organization: PointedEars Software (PES) Lines: 34 Message-ID: <4526211.5joGbGu2Zc@PointedEars.de> References: <1dc7bd11-343d-4cbb-b75d-1db8516666a0@googlegroups.com> <6429329.X1ROTxqqWj@PointedEars.de> 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 1464985231 32098 eJwVyskRwDAIA8CWDIjD5cQeqf8Skux7M8rqNioLqRS9GdXaFPeyp9tH5gTGEV8+HJz/T0qOFxJ4EF8= (3 Jun 2016 20:20:31 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 3 Jun 2016 20:20:31 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYEBwCAIA7CXxFKq5yCM/09YQoRFyYPhHI7VkW0G+Lp07V7kB1/5pCSVvqsWNR94sFs2tF7B453E+wExVhSi Cancel-Lock: sha1:cUzXYyfFLt0U6gWa5M53iIesxH4= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BLMBIeOStQ/xJ6R3P1DjgdvLzlsX9XQRddPTmmISIe0i1xKnEIGmbzK84DEyQQhQ== Xref: csiph.com comp.lang.php:16756 Christoph M. Becker wrote: > On 02.06.2016 at 02:16, Thomas 'PointedEars' Lahn wrote: >> Stefan Weiss wrote: >>> 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. > > As well as all other notices, warnings, etc. Not a problem in this > case, but consider: > > function keyName() { > trigger_error('deprecated', E_USER_DEPRECATED); > return 'x'; > } > @$foo[keyName()]; Straw man (Stefan in cljs, *and* you, being more courteous than him, here where it belongs). I did not say it were the best solution. I did not say it were a general solution. I said it is *a* solution *without extra configuration*. See also: -- PointedEars Zend Certified PHP Engineer | Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.