> > > This topic got quietly dropped last week, but I'd like to make one
last
> > > plea.  I'd like to see Zend throw an E_STRICT when arrays are
implicitly
> > > created.  I know there were objections to E_NOTICE, but did anyone
have
> > > violent objections to E_STRICT?
> > >
> >i like to see one of those too and i have no preference for one of them.
> >
> I would view implicit array creation as a slightly negative thing, similar
> to accessing the value of a variable that does not exist.
>
> We run in E_ALL mode and write our code to avoid all E_NOTICEs.  For
> instance, before using an array, I always initialize it using $aItems =
> array();
>
> I'm in favor of issuing an E_NOTICE in response to this.
>
As Andi stated in the earlier incarnation of this thread (I think it was
Andi), making an E_NOTICE will cause sudden errror generation in previously
E_ALL safe code.

While I *personally* would rather see E_NOTICE used, I can certainly
understand the desire to tread lightly on what has long been considered a
"feature" of PHP.  That's why I think that E_STRICT qualifies as an
effective compromise between encouraging good coding practices and avoiding
BC breaking changes which add little to actual scrript execution.

-Sarra

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to