Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115141 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3147 invoked from network); 25 Jun 2021 12:52:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Jun 2021 12:52:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E312A1804C3 for ; Fri, 25 Jun 2021 06:11:21 -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-Virus: No X-Envelope-From: Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 ; Fri, 25 Jun 2021 06:11:21 -0700 (PDT) Received: by mail-ej1-f43.google.com with SMTP id he7so14981911ejc.13 for ; Fri, 25 Jun 2021 06:11:21 -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=NHi2mE6/fXFBZF9xynVBGiY+iqRqSNQ11iJGqS5n178=; b=pza+6zmGDQajnRbqtWMUcjswKBS0VD84ybgCy41HRe06yfh7VgYXme6v9idBZiF8x/ J74yGhd8DPMYwyWsU0Px2cg6hpqanTIJ9WiPk75zWAYX2jKxZYeexwHI56HqPq5wc1Jc n3Bnhz3Gx/Ru0DWiabRwUrXgGEudj92YefyTimnrP2cyQzyrZ1ca4dLtvRqEuujl4iyt LjpzPFNOOUG9I/bOUEL9gawpJCLSIecjCEWGgmAgTJ7NnviAnp+RlaWpMillgxX9HBJt qIj4D/bNRXslwV/cFW7Eczv6pHwBYsrx69QLpbV44NDQgv/1IpKTbobRXLf4nV8NirHh ahlg== 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=NHi2mE6/fXFBZF9xynVBGiY+iqRqSNQ11iJGqS5n178=; b=hAG7GgUYn9qkx2Kt+FwOXcgUOvX95PWwKhaHHx3K+nd5jyOUIY7NwmKwyZSRYteOxH QfgSD1saUGBWy/JnFnvyjBAXgHRzLenD95vA7QA5xd2GrtfWKksOT/AxEywTWwgVcsuq oYZp+1cGDq21trYHQ7Udx5iv8aO5y0rcZ3rLpW1OTQeBaRRnBsCDNsHjTrHU/4NH++Ks Sg5vtaIjXZ8U1/q5fEHgXP1RpveC+z9IbQYCWnHoh8S4EmmiBIeU4jyU8zcIZO2e7Onk ZUU3SFJ0KkK3dPwMds2dhOlK2CL26nhtZRyS08AyL9SxQpv+fWiRUcO6Cepj550H/63a LdhQ== X-Gm-Message-State: AOAM531EgJP5s+LOaC2j1WiEm3X9ff3Zoyh6AYxOK5nbv7xNbjBb4Udr t+BlVt0VSx+ELRyu3gDq/fPLGwfQjXsXLaRcdsQ= X-Google-Smtp-Source: ABdhPJyMc4Q1xpUNxg5kXUJBKsmcYf2sTVAWOQgt2iY4Ap1JcqkGB4ykJ2jmO87zOf742ZMhOOVY6dNxrND5baBdNYA= X-Received: by 2002:a17:906:bcf4:: with SMTP id op20mr10509573ejb.327.1624626677698; Fri, 25 Jun 2021 06:11:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 25 Jun 2021 14:11:06 +0100 Message-ID: To: tyson andre Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000004520905c596e055" Subject: Re: [PHP-DEV] [RFC] Deprecate boolean to string coercion From: george.banyard@gmail.com ("G. P. B.") --00000000000004520905c596e055 Content-Type: text/plain; charset="UTF-8" On Tue, 22 Jun 2021 at 23:52, tyson andre wrote: > Hi George P. Banyard, > > > With Ilija we are proposing a short RFC to deprecate coercion from bool > to > > string: > > https://wiki.php.net/rfc/deprecate-boolean-string-coercion > > > > As this is the final day for any RFC to be even able to land in PHP 8.1 > > the voting is expected to start in two weeks on the 6th of July. > > > > The implementation is yet to be done but is expected to be rather > > straightforward and finished within the week. > > I'd agree any casts from booleans to strings are usually a bug in the > application > > Something I'd like to see in the rfc: What's the intended behavior > (notices) of `sprintf('%s', false);` (functions internally casting to > strings) > What about `echo true; print(false);`, etc. > > Thanks, > Tyson > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php Hello Tyson, Thanks for pointing this out, we clarified this in the RFC now. Moreover, seeing the impact on the tests of php-src we also propose to change some function signatures to accept boolean arguments. The only such function currently is ini_set(), but others might be added. Best regards, George P. Banyard --00000000000004520905c596e055--