Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89929 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48198 invoked from network); 30 Dec 2015 23:01:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2015 23:01:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 74.125.82.48 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 74.125.82.48 mail-wm0-f48.google.com Received: from [74.125.82.48] ([74.125.82.48:32810] helo=mail-wm0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BB/96-51216-B2264865 for ; Wed, 30 Dec 2015 18:01:00 -0500 Received: by mail-wm0-f48.google.com with SMTP id f206so79240552wmf.0 for ; Wed, 30 Dec 2015 15:00:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=nyjp0XU9/TgrIgvWpT9/IPkOs6IRJfGs5wx9eDJrWvY=; b=Gtbv/wZLV70RnhYH5VDE72CEj8shJEeaSpQlXz491C+x6+Et8FZucpIiV5OFHcnnAN vxqNoV8IYrDoSfbLu877WRz0QurNlzofU2XaDc/ijD8T29Ir2OIEDr88fDxGxp53Y6Ic Jntmd0X6T7Fze515XtV7ZxpF3hlT9ccIMqaf09ckURB+4uBP1z+zgETefyfADuvmJca3 n7nL086CRDHIsdbdPfpTF7kgpAJjyvZSKAlNR/sWbOIy7hR9HaD7Te/EjJwLphXcTeTD WnWrO0EtfEmRpSqPlJBS84tLxaGlNEkSBYLMI8P51bVnQBukWTG3IZmwdAmPyuy/NSOQ lfkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=nyjp0XU9/TgrIgvWpT9/IPkOs6IRJfGs5wx9eDJrWvY=; b=YmmQv1n/J/qhahfPcNr7e6043wQ1kOy9DId5vdhj0pJ5LZzYPL1AlateDSBoWJOaSB NCMpvuQusH9u1wuP7FtPf4JJEZqlJ7BtZwWYiinpYWKgvnz9yBqPzbi6iHY6sSJyiRD+ KOvHYKqSjdKyFb1cER+9ZqDvy9C9lPeqXRaF/AyrxIdk4XqfRerBSv5ZZxxxrCRC+T5d J71dDVU0TWJrfYN5/r9cXgtlsI74rrVgp3nUoytVcjtpHaElRhiXNegOO8igdTMfH72G WvwJyR24yOoNwFrm2Bj2dhYFDRTXDTXouSE1XmMtRXE70Ywi11FQBDSAI/Jw2ygPeCqi X9eg== X-Gm-Message-State: ALoCoQkrTVU5pYSx9CD1BT+tJy7w/UAGS3rXWa0JvsmriCSVXdfUtNMpp+yQKm5ODGEFwudxymlesJ2vE6jQ95mShrEwR4bYAr6MViB6vT3FmV2vGU5J5bc= MIME-Version: 1.0 X-Received: by 10.195.18.100 with SMTP id gl4mr14870364wjd.177.1451516455563; Wed, 30 Dec 2015 15:00:55 -0800 (PST) Sender: me@daveyshafik.com Received: by 10.194.83.198 with HTTP; Wed, 30 Dec 2015 15:00:55 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Dec 2015 23:00:55 +0000 X-Google-Sender-Auth: BQzWwm6mYm93pVTk1fMVLMMr2Pw Message-ID: To: Thomas Punt Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c29608b858f4052825827d Subject: Re: [PHP-DEV] [RFC] Number Format Separator From: davey@php.net (Davey Shafik) --001a11c29608b858f4052825827d Content-Type: text/plain; charset=UTF-8 You mention no support for numeric strings, but how will settype($string, int|float), intval(), floatval(), is_numeric() and ctype_digit() work with this change? I do think if you don't change the semantics for strings to number conversion (which I agree you can't due to BC breaks) there should be an explicit way to support "1_000_000" => (int) 1_000_000. This should be part of the RFC. I presume that if you were to go from numeric to string the underscores would be stripped? What about a way not to do that? What will var_dump() etc. show? On Wed, Dec 30, 2015 at 5:26 PM, Thomas Punt wrote: > Hi internals! > > I'd like to propose for the inclusion of a digit separator in PHP. This > will > help to promote the readability of numerical literals in code by enabling > for > the underscore character to be used in between digits. > > RFC: https://wiki.php.net/rfc/number_format_separator > PR: https://github.com/php/php-src/pull/1699 > > Thanks, > Tom > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --001a11c29608b858f4052825827d--