Re: Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed)
| From: | Ilia Alshanetsky | Date: | Tue, 23 Sep 2003 17:45:57 +0000 |
| Subject: | Re: Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4558@lists.php.net to get a copy of this message | ||
In my opinion the change is fine, given the current state of affairs a
transitional release between 4.3 & 5.0 does not seem likely. Therefor it
would only seem logical to give people a fair warning (E_NOTICE) that the
(wrong) behavior they are relying upon is not going work/last forever.
Otherwise, without a word of warning working code will suddenly become broken
code once they upgrade.
Most people have their error reporting set to E_ALL ^ E_NOTICE (do not display
notices) so it won't affect them anyway. Even then, the behavior itself
implies a failure in some code, since an non-array value is passed to a
function expecting an array. I venture it would help a number of people find
errors in their code that before were nigh impossible to find and/or track
down.
And yes PHP is typeless, but all of the code using new argument parsing
functions will most definitely reject strings passed to functions expecting
arrays and vice versa. I see this situations as not being any different.
Ilia