Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117680 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36131 invoked from network); 7 May 2022 02:07:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 May 2022 02:07:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C672A180035 for ; Fri, 6 May 2022 20:45:37 -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,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-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (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 ; Fri, 6 May 2022 20:45:37 -0700 (PDT) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-2f863469afbso99706597b3.0 for ; Fri, 06 May 2022 20:45:37 -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=C/2NUgQIhRPu2WIoclggm/Dc9i4Wr56rnMEDP2yuERc=; b=VCv98/ReQp0KC8oqsvtHz0Ccc2BFYHP196NnOWnlHdS3zkvkGyjA4SlNk9kA57MDTh h1xprPJpAvoV8SCzmYymg9niXbo/wsfaDxlqnV9zlL1yB0cJh5fK+8HLmDuVdMgCcPlT 0NeXiwaYM0JKLRkHNvzup2uocVck9EWhgxGYNsRGDo2EeVUbokNB5OUbp0V15ybJz9hf BenRYEJug9gQLS2l73S7+Xrgy99jTbs5BFqAsSPTzCTKhcWvh6Xn+0R0csEpM7y4RwBS cb1XPen+HtzVoYgvbfhbtd+4Sj1hrWppfkKx5qc3D6kFIJEUq4qB6Yo/oXKRHov59iGy aQqQ== 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=C/2NUgQIhRPu2WIoclggm/Dc9i4Wr56rnMEDP2yuERc=; b=Kqt6JMXO8SoIOdxsk6fInzwph4GIt0SBWqp5+II0wqvYrd0oOX3h2a3kUGBlF54nLu 7iBYGts5QPhTlZSrbMUQKLG6luK56vS5R85cek1UdmEWP331v9AjgtASlEFwFcKj0VJT KC9QerXMk1gQQ3p5FeqMX+Z5zKf9zCy0wJia3IK+hoircZ4upB9zavJsV6D5AXSRSF+K 0PiMwD8+HNyvrJPyT1HItlkFgpho4u0SNmBvrWHro3eDmTqGTIBkI4h4eQ+IP7KCJEq3 g8xSa4aRUc1GkTCH7ktMylCWTDzLnavWUaTJJ+DoqQYtlRFd8B2bo45dXcFkBSKpXSzc uzfg== X-Gm-Message-State: AOAM532Abq+fkUyOB+UfHUy7v9scXSW+xnZbj/IjLTW52gxzQLXfoKHY FJh+gyQPcH54u/KeINMUTKl+F+mAOrnheGe6cJvMBB87 X-Google-Smtp-Source: ABdhPJxuoe09ksIeGLVqs83o/QdobtfsYH4MA5zu8dXm+oHxpLuA78KeVxMrnGqvrANs5ElN9VMkJ0Vt78ucCz4Efkc= X-Received: by 2002:a81:2541:0:b0:2f8:efd7:8962 with SMTP id l62-20020a812541000000b002f8efd78962mr5850395ywl.404.1651895136471; Fri, 06 May 2022 20:45:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 6 May 2022 20:45:25 -0700 Message-ID: To: Craig Francis Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000d0cfca05de63ce3e" Subject: Re: [PHP-DEV] NULL Coercion Consistency From: jordan.ledoux@gmail.com (Jordan LeDoux) --000000000000d0cfca05de63ce3e Content-Type: text/plain; charset="UTF-8" On Fri, Apr 8, 2022 at 10:35 AM Craig Francis wrote: > Hi, > > I've written a new draft RFC to address the NULL coercion problems: > > https://wiki.php.net/rfc/null_coercion_consistency > > This is due to the result of the Allow NULL quiz: > > https://quiz.craigfrancis.co.uk/ > > 14 votes for Fatal Type Errors irrespective of `strict_types=1`; > 13 votes for NULL coercion when not using `strict_types=1`; > 8 votes to update some parameters to allow NULL; > > I appreciate some want to force strict type checking on everyone, but I > want to make sure we have this properly documented, with names, and > explanations. > > Breaking changes should be justified - if they aren't, they only > make upgrading difficult and frustrating (bad for security). > > Craig > This RFC seems to be trying to force all PHP developers, regardless of what *they* think, to treat null as "whatever the default value is within the type context of execution", which is probably the most dangerous and bug-prone usage of null in PHP code. This would make it almost impossible for most programs to treat null instead as "an undefined value which must be explicitly set", which is another usage I commonly see in code. Given that, I think there needs to be much more justification of this change personally. Jordan --000000000000d0cfca05de63ce3e--