Re: Proposal for serious BC compatibility aka language versioning

From: Date: Sun, 03 Feb 2013 22:44:52 +0000
Subject: Re: Proposal for serious BC compatibility aka language versioning
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-65596@lists.php.net to get a copy of this message
On 02/03/2013 02:39 PM, Karoly Negyesi wrote:
>> array_diff_asccoc() comparing array(1,2,3) to "Array" and saying those
>> were equivalent without any sort of notice.
> 
> That's not what happened, some contib was comparing array(1,2,3) to
> array(1,2,array(3)) and even looking at the documentation it is not
> clear whether the cast should or should not throw a notice. But, if
> that's desired behavior, I will add a note to warn people.

The cast should always throw a notice. The function is documented to
only compare single-dimensional arrays, so if you pass it a
multi-dimensional array it is going to treat them as a single
dimensional and the only way to do that is to cast them to scalars.

-Rasmus




Thread (48 messages)

« previous php.internals (#65596) next »