Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109265 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6961 invoked from network); 24 Mar 2020 11:50:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Mar 2020 11:50:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 35F811801FD for ; Tue, 24 Mar 2020 03:15:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 24 Mar 2020 03:15:09 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id v4so9011779lfo.12 for ; Tue, 24 Mar 2020 03:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kQ71vGJPK7O6SIrQM4sNACMjK8ommi8U2j/6kQ74xdw=; b=fdfr02+frRyyJ6oojnn6iaf4Op0CRgZ6om+B9NlYOHQ+2BF9mqnvKBmHxcwfEJnvky puEezWm/eRHtqlc2vTgLY0O4otv6hEokiWg7xKINeJHMhgzRSQIFUCgp1kLopde5qCQJ 4CvrBMOqw512xFn/+AJcwgZ+2dQEh+lmbbuMMgpAxL8q+EdlxFtEnFWwYFYoJET8X9aj Pb1TorovR8B/5ZxYfNk2zEspW9FFkjNENRTjv87vU2+7wRMQeosT5KxgYGDOx+HyvtXO +hmFfA8f3FgCnzt0VPmbOUmeRNRBYq7Kk7BOs8PIn0IBT4JHWNMDLsCHe0vpYBV8kbN1 he8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kQ71vGJPK7O6SIrQM4sNACMjK8ommi8U2j/6kQ74xdw=; b=X43RV96zPueGLYwo+83V7xNSe80SJLXfdrmdQQfDr0TnPOQHo6Tj9QOv4ilN5h1ci2 Uht6Ur7Vr5WxVJvIu352dyNrWhPw1UVy+O3P5EMoKVmYbxj8HLW24QqEmZCvtelg9R0l G8rPAB5DQgUBcSgcv9JRRYOvCj+DCOtaylJ30JwMYY0y3tZK2WkOU4Mo2Fgjp+BXqHZ7 ghXgExTozIO+A/OEOW8UaN8KKjp1ezw2JFoKndMJNPm95OcBma6EuxPoED0CaDo6BhdA 9D3hxG2gnpoOrNokEcDfRWxyfQRn+tv3CC9st8AF+EKvrNQAfoA7uDDbdqlS3HqcJa7U nj1w== X-Gm-Message-State: ANhLgQ1TU3+8XRkRPaT6BIIlclSPylHqY9BdnB/Zu8RDv9F46pycAqIp NYXyP+6+88W7iRa6ngEkfaNnKwAVOei8BLnAXO0= X-Google-Smtp-Source: ADFU+vtZagyevv+71LPvTlFxqsceRyfn880UVh370ekPcDrAnl6p4HHZnsS9rxnFEcW54d12c6Ab8EW73CCe7yHwTxc= X-Received: by 2002:a19:761a:: with SMTP id c26mr4374502lff.190.1585044908105; Tue, 24 Mar 2020 03:15:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 24 Mar 2020 11:14:52 +0100 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000b365d405a197065b" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Locale-independent float to string cast From: nikita.ppv@gmail.com (Nikita Popov) --000000000000b365d405a197065b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 24, 2020 at 10:40 AM M=C3=A1t=C3=A9 Kocsis wrote: > Hi Internals, > > Together with George, I'd like to propose an RFC for a long-standing > problem PHP has: > casting floats to string depends on the locale settings. As this behaviou= r > is nonsense, and > because it can cause quite serious problems, we would like to get rid of > locale-dependence > in PHP 8. > > Please find our RFC at > https://wiki.php.net/rfc/locale_independent_float_to_string. > I'm obviously in favor of this proposal. Only really comment I have is on printf(): You're right that we have %f and %F to toggle locale-sensitivity, but the %e, %E, %g, %G formats are always locale-sensitive. It might make sense to introduce locale-insensitive variants of those, especially considering that %G is considered the "standard" floating point format. Internally we support %H for that, so we could expose that... (Alternatively, locale-sensitivity might be removed for e/E/g/G.) Regards, Nikita --000000000000b365d405a197065b--