Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117004 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 79857 invoked from network); 7 Feb 2022 18:05:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Feb 2022 18:05:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D3FA11804C8 for ; Mon, 7 Feb 2022 11:21:12 -0800 (PST) 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 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-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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, 7 Feb 2022 11:21:12 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id u7so19596546lji.2 for ; Mon, 07 Feb 2022 11:21:12 -0800 (PST) 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=n1wZbxNjgeIevgfrOcmCtw68R96ocei3UnDb4Vvzrp8=; b=Dpvyz5C0lIKQBR9KE09P+leG3CZBcGFzBo5IE+I/KfTpqCNo1NI4hS+VjNwCwILYRF jWX9tYJ/gkN9fJ1l76jlFivDKnUL1J6S51wgAazn9rqzl0c/oB8CdCDy4QZDHZFBbpKw 82cbSroykyYWDs9YbV/zWzno7OddwaJNnTkJ4= 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=n1wZbxNjgeIevgfrOcmCtw68R96ocei3UnDb4Vvzrp8=; b=c4IuYrvZtMeUqYhOc5DChtPzCiZOHYKf891qP5N6tNyEmoylGTujYELfKz2wn1eMcS Vef/waOdKNfqQj1OdOh2/OjrQIHKXjvNZBy+EMdCrNyc/NG9V0KMdYVD0fma1yPvsJm1 n9uNZvtYF9QecvrgSFkYczeV6ekBxPpcjcT+DPX0za0V0UiuCo74mA5meof8F/EaL+pK FerYclQQLLEvlKj7teT8Yfi+bgtNADMQfp49xY8ccuhq1DnA+1A40T5XJQQd6C4UkZ7w uNebWbcyEE/2FgsTNYKKgQORUCmS/CWiwnHKvZo5fF+txGSYcxK30P4tVkvOn9xwLob9 5ATQ== X-Gm-Message-State: AOAM533fZGqxAvrDK8rIKW0T7mrDPO/R71dXS9iR33U6QNTvVw9oIlWn ZTGkOk/bT7aQ3aHBa39UUuBs5PxfGJDJV/P35OVbZg== X-Google-Smtp-Source: ABdhPJzYSkwJFvLbQOHVaTlrsitBTiI8Bva6/chHjQ0UYNoR5L6/W2J91SgDBQ9qz5hiSUY+QFb7YmsxLhlcz6Zoapc= X-Received: by 2002:a2e:a5c3:: with SMTP id n3mr595416ljp.212.1644261670324; Mon, 07 Feb 2022 11:21:10 -0800 (PST) MIME-Version: 1.0 References: <7CCE6061-F5BD-4C10-8BD1-F5A2A994D5F6@cschneid.com> <082301d9-2e69-48ce-a85e-a6e2a57e3f9e@www.fastmail.com> <5fcc24de-0861-46fd-95eb-8ca6d326f93e@www.fastmail.com> In-Reply-To: <5fcc24de-0861-46fd-95eb-8ca6d326f93e@www.fastmail.com> Date: Mon, 7 Feb 2022 19:20:59 +0000 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000c7244f05d772805f" Subject: Re: [PHP-DEV] Allowing NULL for some internal functions From: craig@craigfrancis.co.uk (Craig Francis) --000000000000c7244f05d772805f Content-Type: text/plain; charset="UTF-8" On Mon, 7 Feb 2022 at 18:39, Larry Garfield wrote: > I'm not suggesting a separate RFC for each. One RFC with several votes in > it is fine, IMO. > > What I disagree with is changing the definition of strict_types=0 from > "use the well-documented coercion logic at parameter and return points" to > "use the well-documented parameter and return points, and also add implicit > nullability but only for internal functions, sometimes". > Thanks Larry, that's fair... I can do that, and update the documentation as well (will wait a bit to see if anyone else has any feedback). Now the next problem, if we are going to have "One RFC with several votes"... I've got 276 functions (336 arguments) which I think should preserve their old behaviour (as in, there is no reason why a Fatal Error should happen with a NULL value in PHP 9). It might be possible to group them, like the 60 functions just related to encoding values... because voting for them all individually in an RFC would be a pain (I should know, I was checking each one). Or should I setup a survey to make it a bit easier to collect yes/no feedback before the actual RFC vote? I could add a feature to tick or untick all by default. Craig As a side note, there are 99 functions on the "probably not" list (aka maybe)... and 442 on the "other" list (the edge cases, like `$method` in `method_exists()`, that would be weird if it was given a NULL). --000000000000c7244f05d772805f--