Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79100 invoked from network); 20 Nov 2013 21:53:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Nov 2013 21:53:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.241 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.241 imap3-1.ox.registrar-servers.com Received: from [198.187.29.241] ([198.187.29.241:50072] helo=imap3-1.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/C4-51208-55F2D825 for ; Wed, 20 Nov 2013 16:53:25 -0500 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id 80E132A0083; Wed, 20 Nov 2013 16:53:22 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap3.ox.registrar-servers.com Received: from oxmail.registrar-servers.com ([127.0.0.1]) by localhost (imap3.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hCeZsgRgsfnr; Wed, 20 Nov 2013 16:53:22 -0500 (EST) Received: from [192.168.0.13] (unknown [94.13.99.191]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id EFBBC2A0088; Wed, 20 Nov 2013 16:53:19 -0500 (EST) Message-ID: <528D2F4D.6050003@ajf.me> Date: Wed, 20 Nov 2013 21:53:17 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Yasuo Ohgaki , Nikita Popov CC: "internals@lists.php.net" References: <528D2E66.7090009@ajf.me> In-Reply-To: <528D2E66.7090009@ajf.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] fix bug #53432 (Assignment via string index access on an empty string converts to array) From: ajf@ajf.me (Andrea Faulds) On 20/11/13 21:49, Andrea Faulds wrote: > > Just my 2 cents, but that definitely looks like a situation that might > crop up in real code unintentionally, and it violates the Principle of > Least Astonishment IMO. Consider a hypothetical function which returns a > modified string. If we've ended up with an empty string being passed > into it, then it suddenly returning an Array is not what you expect, and > might horribly break code that assumes the result won't be a string. > Oh dear Andrea, you should proofread your emails better. s/won't be/will be -- Andrea Faulds http://ajf.me/