Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117003 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77082 invoked from network); 7 Feb 2022 17:23:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Feb 2022 17:23:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7228B1804C4 for ; Mon, 7 Feb 2022 10:39:08 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 10:39:07 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6824D5C01B9 for ; Mon, 7 Feb 2022 13:39:06 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Mon, 07 Feb 2022 13:39:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=aeQ1jI1uU4wBrcP4O EjKC+8wx6LnstYUfLOi6cT2vHE=; b=VbfeEBpaZtsFOqcKimWB5KHxWwBIVgDVB B9n0KieztfYmT9sOj1vGlr6NyWv+hbhNb/mbRJg26MaPb5zWbNwo4eM1pCsBM0Up XvVQkylKPFwx477lLXgwjJW6jhxLg7D7EDwrE0O3br2QC7C5/F+rPCRj2NreLIUm vZFTG2CUfHkA3UafBNRwOopscW7i1auOkLgfYhRvJt1R9i4UssQ32lO39qPM2QIc aBFwD+S0k8NONPNyESqTLnT8Gzdy62VVk2wrpEtIJkvy2A7dP48E+6FH63ZiGRQy 9CRYqrvwL7CJWNa0nirqtH08kkgsL1+xqunjjvpwi7CUg/1gZlpag== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpefgieeigfeikeeiffehjeeuvdehhfdtudelffeljeeu ledvffekieffuddvueetkeenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhfuhhntg htihhonhhsqdgthhgrnhhgvgdrmhgunecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2A002AC0E9A; Mon, 7 Feb 2022 13:39:06 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4748-g31a5b5f50e-fm-cal2020-20220204.001-g31a5b5f5 Mime-Version: 1.0 Message-ID: <5fcc24de-0861-46fd-95eb-8ca6d326f93e@www.fastmail.com> In-Reply-To: References: <7CCE6061-F5BD-4C10-8BD1-F5A2A994D5F6@cschneid.com> <082301d9-2e69-48ce-a85e-a6e2a57e3f9e@www.fastmail.com> Date: Mon, 07 Feb 2022 12:38:44 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Allowing NULL for some internal functions From: larry@garfieldtech.com ("Larry Garfield") On Mon, Feb 7, 2022, at 10:39 AM, Craig Francis wrote: > On Mon, 7 Feb 2022 at 15:15, Larry Garfield wrote: > If there's an argument to be made to rewiden a type to include null, make >> that case and have that debate on a function by function basis. > > > I'm fine with that, but I worry people are underestimating the size of the > problem (having a debate on each one would take a long time). > > I've put together my proposed list, it took a few days, and a lot of > thought: > > https://github.com/craigfrancis/php-allow-null-rfc/blob/main/functions-change.md 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". If it makes sense for strlen() to be nullable, then it makes sense for strlen() to be nullable. One or the other, not both based on a flag. > I've asked for suggestions and pull requests a few times, and the best I've > got is `$path`/`$domain` for `setcookie()` (I disagree because `NULL` is > often used for those arguments, so that `$secure` and `$httponly` can be > set to true). Such is the RFC process... --Larry Garfield