Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81208 invoked from network); 22 Nov 2013 00:28:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2013 00:28:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.50 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:58506] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/E0-09639-615AE825 for ; Thu, 21 Nov 2013 19:28:07 -0500 Received: by mail-la0-f50.google.com with SMTP id el20so389720lab.37 for ; Thu, 21 Nov 2013 16:28:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=UekNE23F+g9vVbAeA9YEVQ+RauMH/aBsZdaDP+szH3g=; b=V+hhqbhiRwBlQ0oN+JHQt8gWZTuINZyMiWZ/lo3y5Eh6DRWsdci+h0ujPBTzMaO4fT gpYwE+iZbqg1yQeRgx4U1mcWk/x8Z50OU2Rr9yxg144dakIUGe8fKDe6UwBY49ZXRUkq D6mBbeCNmzon0eIfbnnIZJclsWs0gQPa0poLLTN7lycKqMdr3uEEAVjdu+PqLM+ie8PN ieDocItIcNp4j/imFmNPhdjGlP2zI+4fA+4mzktz6t5/Iz/hMqaS6TsgnnmEplvvI5M4 yT/bdpaaLNIgbsbVI/KDstVLBVNClMjedDbNi4+k4B6u/Z+cm5YvlVOpvqXY/MzGZ2xI WjeA== X-Received: by 10.152.23.137 with SMTP id m9mr7073728laf.17.1385080083359; Thu, 21 Nov 2013 16:28:03 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.154.201 with HTTP; Thu, 21 Nov 2013 16:27:23 -0800 (PST) In-Reply-To: <528E63D5.6090908@sugarcrm.com> References: <528D2E66.7090009@ajf.me> <528D2F4D.6050003@ajf.me> <528E63D5.6090908@sugarcrm.com> Date: Fri, 22 Nov 2013 09:27:23 +0900 X-Google-Sender-Auth: 3_YYbGvu4Q0CVhY-_2H5FVvNAjI Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0160a6765aaaca04ebb91668 Subject: Re: [PHP-DEV] fix bug #53432 (Assignment via string index access on an empty string converts to array) From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0160a6765aaaca04ebb91668 Content-Type: text/plain; charset=UTF-8 Hi Stas, It might be better to change RFC title. My goal is sort out PHP behaviors which may seem strange. If it's a bug, fix it. if not, document it so that users understand what it suppose to do. On Fri, Nov 22, 2013 at 4:49 AM, Stas Malyshev wrote: > > I've added this behavior to RFC (NOT for voting) > > https://wiki.php.net/rfc/comparison_inconsistency?&#conversioncomparison > > I'm not sure behavior that is documented and implemented exactly as it > was planned (e.g. min() behavior) can be called "inconsistency". It is > actually completely consistent and does exactly what it is meant to do. > Same for dec/hex strings - it works exactly like strtod(). Of course it > does not support every numeric base in existence, but it was never > supposed to. > I agree. It's the way PHP works. It might be better to document these, since there are many languages out there and people have different expectations. > Also, "Null string is not handled as string" is not correct - null > string is handled as string, except in one narrow case where you apply > array operations to it. Right now it gives an impression empty strings > are not handled as strings in PHP at all, which is not correct. I've updated to "Null string is handled as array" when string is accessed as array of char. I appreciate better explanation :) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0160a6765aaaca04ebb91668--