Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65596 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29703 invoked from network); 3 Feb 2013 22:44:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2013 22:44:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.160.44 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.160.44 mail-pb0-f44.google.com Received: from [209.85.160.44] ([209.85.160.44:46169] helo=mail-pb0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/76-22879-968EE015 for ; Sun, 03 Feb 2013 17:44:57 -0500 Received: by mail-pb0-f44.google.com with SMTP id wz12so2863956pbc.31 for ; Sun, 03 Feb 2013 14:44:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=NaVVbTKDsPMsFLaWQ/E1+Mv8rD5fRCV3Z2Bi4TCsImo=; b=Cxkq6mm0Vb/E3+qqfwkoXN2syvQdUdYYcf2ywdomKyf0Z4hIfQk/Rcst133S2JyfMh SDaJ2LizWnIODeW1H0wtwdTKeJM301zAUCrP0ldwwJa3yV3reNd12i/aeHVelw3OcWxh oNH/CxVjmBL6fkq+jwXKsKyzT1Xh1j+sH/aNE40m3TecztvSt3H2CYzzstPDnHfTRFIa Lrgmfx96FwwqISyln7/YyY9zW8Z0RobZefNA6NMnsX/QPTqHwbIe7GMTA8Af8gFiFnz8 nLahYUZ+6jVXR89lfZxz/24tEw/eWUnpqWNghICfHMWMqI8X25On6cACoXBzWg82VF5L dGFw== X-Received: by 10.68.252.69 with SMTP id zq5mr49822128pbc.104.1359931494614; Sun, 03 Feb 2013 14:44:54 -0800 (PST) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id rv5sm15806033pbc.32.2013.02.03.14.44.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 Feb 2013 14:44:53 -0800 (PST) Message-ID: <510EE864.2070704@lerdorf.com> Date: Sun, 03 Feb 2013 14:44:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Karoly Negyesi CC: "internals@lists.php.net" References: <510EE649.5060104@lerdorf.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnVl+cbwEET7wbkUZIW3EvsijYl55dLowdjU6LB6vu9teKX80xt7yCtpIEF7QhA8yd6AE0b Subject: Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning From: rasmus@lerdorf.com (Rasmus Lerdorf) 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