Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40182 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46955 invoked from network); 31 Aug 2008 08:39:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2008 08:39:30 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:17561] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/B0-27196-FB85AB84 for ; Sun, 31 Aug 2008 04:39:29 -0400 Received: from [10.1.10.32] ([10.1.10.32]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 31 Aug 2008 11:40:29 +0300 Message-ID: <48BA58BA.9090404@zend.com> Date: Sun, 31 Aug 2008 12:39:22 +0400 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stanislav Malyshev CC: Matt Wilmas , internals@lists.php.net References: <013e01c8f257$1e1bbcf0$0201a8c0@pc1> <4890B18E.7000500@zend.com> <00e001c8f302$e8100fb0$0201a8c0@pc1> <4891A769.6090306@zend.com> <026201c909dc$46875860$0201a8c0@pc1> <48B856D9.7080906@zend.com> In-Reply-To: <48B856D9.7080906@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 31 Aug 2008 08:40:29.0951 (UTC) FILETIME=[395858F0:01C90B45] Subject: Re: [PHP-DEV] Re: [PATCH] Constant expr folding (again), and other things From: dmitry@zend.com (Dmitry Stogov) Hi Stas, We discussed this patch with Matt, and I allowed this change. So it probably my fault (I missed run-time locale change possibility). I don't think it is a really big issue, but it really may change behavior of some scripts. I think we should revert this patch, before we get complete solution for compile-time expression evaluation (not in 5.3 of course). Thanks. Dmitry. Stanislav Malyshev wrote: > Hi! > >> static $a = -'abc'; // 0 >> static $b = +'abc'; // abc >> $c = +'abc'; // 0 >> } > > We could get into trouble here. Imagine: > static $a = -'12.8'; > > This should be -12.8, but what if locale changes and . is no longer > decimal separator? Moreover, what if locale changes between compile and > runtime? We get entirely different code now. > >> Well, I don't know if it can be tossed in quickly at this time, but >> there ya >> go since I think it's pretty basic! ;^) > > I think it's not the feature that can be "tossed in quickly" - it can > have some obscure side effects, as I described in my later emails.