Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117514 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 95730 invoked from network); 11 Apr 2022 13:40:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Apr 2022 13:40:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7E31E180510 for ; Mon, 11 Apr 2022 08:11:52 -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,HTML_MESSAGE,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-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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, 11 Apr 2022 08:11:52 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id 15so5705233ljw.8 for ; Mon, 11 Apr 2022 08:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L73HmK8YSk0wMDvdeAeLSLAe3wADvluUMF8WdBT/Jlc=; b=BvJjkrEKVi6qWBIhk8g31d6q+Yz5c42UJmNAqXJyOnp6SwOBI+DZL/OM55YjeEgCPA XAGr2d0n1TNF4uogAMeRelhHjB9pqAOICEJ8gOwVmS3Q95zDpjQXtBTEybZPKszOyP7W lOeSUEnRgXbxeWhVVCncCD3M/chf1TaigQqyo= 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=L73HmK8YSk0wMDvdeAeLSLAe3wADvluUMF8WdBT/Jlc=; b=U23F9Z1Kvhx9xGkN1KYxGCSiTS5WYpG5VzhEtrXyoOeOb0dJEZVf74Ppv2+ge5UXsT ANKJC/l4CTOpm8KYEDMOIsb9tgrvs9GR89Yb5cjZmrMU8AF8TsKAtnt8qIyncKkE3UT+ BljXfyfDKmNB7jk/TUZXjRq54seWFMnOOov9b5qJ12fgmalgdp3gEjsEsX6x7fI5DrYk 38ZE32Gg7SMgtsFCZsTkGkepvfdqNrvILGyBSediVpJmWBYBakT1DxeNKk+rXvpbHMdy BR8LwT/dUUTAH8R0UcRGumb2mXxq0uHBFaaJ95Vh8Y19RrqAyhZlkCDtCAWRbb76TqVQ I98A== X-Gm-Message-State: AOAM533IdBqo5VJBOwxC6cRz8G9hhwpQ/KT+uMP3orOE4/iczgoBk2MY UNwV+TO1epvilU1+xrWJC5mi9DRo83Nn1eezygWkVg== X-Google-Smtp-Source: ABdhPJxluQv6vckzTxp8CPoZRFGOEykTD8ggnR3HuTOgIKw1SqQhlOo0S7KoiFfC2csEGrAQ5ZX0eyqMrj5aORL3/yU= X-Received: by 2002:a05:651c:1695:b0:249:8540:837a with SMTP id bd21-20020a05651c169500b002498540837amr20409452ljb.495.1649689910023; Mon, 11 Apr 2022 08:11:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 11 Apr 2022 16:11:38 +0100 Message-ID: To: Guilliam Xavier Cc: Mel Dafert , PHP internals Content-Type: multipart/alternative; boundary="00000000000013ad2005dc625d1e" Subject: Re: [PHP-DEV] NULL Coercion Consistency From: craig@craigfrancis.co.uk (Craig Francis) --00000000000013ad2005dc625d1e Content-Type: text/plain; charset="UTF-8" On Mon, 11 Apr 2022 at 13:05, Guilliam Xavier wrote: > > https://wiki.php.net/rfc/null_coercion_consistency > > You've updated the **Documentation** section (also: did you mean > "inconsistency" rather than "inconstancy"?) but still not the **Proposal** > (BTW all those sections between "Introduction" and "Proposal" would > probably better be *sub*-sections of a section named "Problem" or "Current > State" or something). > > And for the question: (currently) the RFC is named "NULL Coercion > *Consistency*" and the Proposal says "Must keep the spirit of the original > RFC, and *keep user-defined and internal functions consistent*.", which (to > me) implies *not only* reverting the 8.1 deprecation on internal functions > *but also* "changing user-defined functions under strict_types=0 to > [coerce] null for scalar type[ declaration]s" indeed. > In any case, that should be written clear in the RFC (either in "Proposal" > or "Open Issues"). > Thank you Guilliam, I've applied all of your suggestions (with a slight tweak to use `strict_types=1`, just because I find it easier to read). While I am open to for user-defined functions to keep the type check for NULL when not in `strict_types=1`, it does feel like a bug, and I think it would be better to be consistent (happy to discuss on or off list). Craig --00000000000013ad2005dc625d1e--