Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16756

Re: not "autovivification", but ...?

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.php
Subject Re: not "autovivification", but ...?
Date 2016-06-03 22:20 +0200
Organization PointedEars Software (PES)
Message-ID <4526211.5joGbGu2Zc@PointedEars.de> (permalink)
References (3 earlier) <nin783$9qu$1@news.albasani.net> <d7cf47ca-3871-46e0-8434-b17ec1fe1440@googlegroups.com> <ninr5k$gee$1@news.albasani.net> <6429329.X1ROTxqqWj@PointedEars.de> <niovaj$a17$1@solani.org>

Show all headers | View raw


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: <http://php.net/error_reporting>

-- 
PointedEars
Zend Certified PHP Engineer 
<http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: not "autovivification", but ...? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-02 02:16 +0200
  Re: not "autovivification", but ...? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-02 11:47 +0200
    Re: not "autovivification", but ...? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-03 22:20 +0200
      Re: not "autovivification", but ...? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-04 16:24 +0200

csiph-web