Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117736 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21584 invoked from network); 16 May 2022 14:44:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 May 2022 14:44:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9DC061804A9 for ; Mon, 16 May 2022 09:24:44 -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, 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-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (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:24:44 -0700 (PDT) Received: by mail-yb1-f173.google.com with SMTP id v71so2864008ybi.4 for ; Mon, 16 May 2022 09:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lXuvXnblC9MkaR0o+rnHHCL2iUrbdzF76InOHtMHRJI=; b=F8vgagiYQj3GYpJUES3CxHbPYQCsOqwdTH2f8dWB1+Y03GVkXNzs7qX2MYyy1tNVgS 0QErsXdBBv2IxIvZ9kcAamucuDV7KKGn8zob6bhjIwauY2o0mmX7a2BWX8k0rFEkFJFX eBOOCRiNR4ZMVnjUQerioPxsuLC3ZQt7bVxXbB8VPXtaiuwzxNIdBTCGznSRIq2ONKan rcvHgH85AHynvXVQ68m+o8N3ZIhV7a7Kmd+unzYJXYbfqJd5COKpHn9t05m4YK6O1Ewd 4TLksH9Jn3rOVJKtGSoaBiMIWi4z+zQBLI6M+6wy1Xi5sE30TrfTfLv+OROD3vg/evnG pB9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lXuvXnblC9MkaR0o+rnHHCL2iUrbdzF76InOHtMHRJI=; b=8HLViPEStVNQOG6iirN1J5elqzB+AEKLFPbIYyRWOyrQB+H+rcMUkY6ClefVRe7Rne 4JQGEepCP0vnCbfFnONqVxX6p0SF4LBBAzRVURgojK3o18UWHKwLZulOGscYBwJK6zpI jj1ndmNA6pIDM3ISu6XFUzGE7HQwUWxZIc+NDRshj3mTB2eE4ZVIfRDZ1OcIRF9jrlyg bFgOY5yucUzzieLnbJYSOX1uvyqkiMFtCHwnzPo2FT9to/hv7oMoANSuRRFktX5ysD3c I9yiVHzSXPpKMOPooQJBkJLsmZQuPKwIsMj0gPznSHpKbxvq8KRObYjo07kxzDSnieIJ a7QQ== X-Gm-Message-State: AOAM530WG5z1cOu9xF88EC1YN7vCY/Bosy+DN+/1z5x4RLhDR0Svw6w1 7v6DeEnD0pe3rR9kClup4OmDMujdbyYtKLNPpQ== X-Google-Smtp-Source: ABdhPJx+1E9pQLeMLsauc8dTf1m+OriXex0eKJ4mFaHTZ6gdH6x9jNy1y5vurvUHHMhAwek0cV92DEYrCs/slFZF9js= X-Received: by 2002:a05:6902:d:b0:64b:2de2:c039 with SMTP id l13-20020a056902000d00b0064b2de2c039mr18567438ybh.402.1652718283876; Mon, 16 May 2022 09:24:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 16 May 2022 18:24:33 +0200 Message-ID: To: Andreas Leathley Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions From: guilliam.xavier@gmail.com (Guilliam Xavier) On Mon, May 16, 2022 at 5:06 PM Andreas Leathley wrote: > > Hello Internals, > > After the first discussion about this topic > (https://externals.io/message/117608) I have created a preliminary > implementation and an RFC for making implicit boolean type coercions > more strict: > > https://wiki.php.net/rfc/stricter_implicit_boolean_coercions > > With this email I'm starting the two week discussion period. I welcome > any feedback on it and hope to further iron out the implementation if > needed. I mainly chose the route of introducing a deprecation notice > because it is in line with other RFCs that have similar goals (like the > Deprecate implicit non-integer-compatible float to int conversions RFC), > and it is fairly non-intrusive. > > Best regards, > > Andreas Hi Andreas, Thanks! Am I right that it only affects *type declarations*, and the "Unaffected PHP Functionality" section could also mention implicit boolean evaluation in `if`, ternary conditional (?:) and logical operators (!, &&, ||, and, or, xor)? Regards, -- Guilliam Xavier