Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117735 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20091 invoked from network); 16 May 2022 14:38:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 May 2022 14:38:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3CBED180210 for ; Mon, 16 May 2022 09:18:56 -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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.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 ; Mon, 16 May 2022 09:18:55 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id k26so1224585wms.1 for ; Mon, 16 May 2022 09:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o26D8ZklT7wZzRaoYam3e5qV0CAL8i769Q41S79dj9s=; b=hlRaNBxrMyC0GmkfigRR2nmXp34dwrC+KBTgrnrM1MM2YMeMmDnsJnpZkKkKPH5L2M FS4o4296ro0uiGR3T35D6CcB+tnDfjpCFXjSiItvMMFHdO6PTenwfP8gbh+BN0Ydi38r usE/sXprG8030QJ84kYPaABshdaVF1sMtfxe0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o26D8ZklT7wZzRaoYam3e5qV0CAL8i769Q41S79dj9s=; b=fvp2i1wIzCXP7wV8MbOEfupNPPolvT9vcctehJ9g/4JPPib8Q5zzOMxwL96eFr6Erj aF9motT1QP4r256HH4o3HQm3u8C7aPrvYP/2tDAdYyIHjHcKkg4eyUU7yIfVwewM5FFI j/3fPVCW5BOleF3r35MHGruNWnWIAKJUHa6/81UatOfY0h44AvdO1mDPTmxlJkGij/iE U6ZgG9GTgJYjIAGD1lI1n3wR9fnNZN6FMT8c9iXMVWSMHN4vnJwtqLYPX7yZHfwK/tFb HZYj9fQw8YJCnOTjTZgUI3oRy8bKd+Wd4/9LtyVO/BVHSJ6y6BxR5VeroM/ziIDLA4rZ CcaQ== X-Gm-Message-State: AOAM533oaH3LzBtUseA2c71eXtrlIS95fnY4vfJyySkhnrLBwudYrdPZ AZ5hPAmItiXZ5Fq21nkD17vf3Q== X-Google-Smtp-Source: ABdhPJz3Stz6E8EG2TEqDVo9zB6sM2tXmRyruYfTcnnTlRG0EEEH3vnoaKlS/XaSSOGxfFc5gHj/Ng== X-Received: by 2002:a05:600c:24a:b0:394:4ce6:57db with SMTP id 10-20020a05600c024a00b003944ce657dbmr27690577wmj.193.1652717934221; Mon, 16 May 2022 09:18:54 -0700 (PDT) Received: from smtpclient.apple ([94.173.138.98]) by smtp.gmail.com with ESMTPSA id n14-20020a05600c500e00b00394708a3d7dsm13705451wmr.15.2022.05.16.09.18.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 May 2022 09:18:53 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) In-Reply-To: Date: Mon, 16 May 2022 17:18:50 +0100 Cc: Andreas Leathley , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <1CBFFD57-D712-4821-8B15-4498D052CB89@craigfrancis.co.uk> References: To: Kamil Tekiela X-Mailer: Apple Mail (2.3696.80.82.1.1) Subject: Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions From: craig@craigfrancis.co.uk (Craig Francis) On 16 May 2022, at 16:19, Kamil Tekiela wrote: > On 16 May 2022, at 16:06, Andreas Leathley wrote: >> https://wiki.php.net/rfc/stricter_implicit_boolean_coercions >=20 > Has any case study been done already about how it will affect existing = codebases? The last time this happened there were no checks: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg https://externals.io/message/112327 And unfortunately the result was not good for that one :-( But, at least with this RFC, I can see how some coercions can be = problematic, like the string "false" being cast to true. With any of these changes, I just wonder what the costs/benefits are, = and if there are any edge cases / oddities. Craig