Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117682 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52886 invoked from network); 7 May 2022 07:01:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 May 2022 07:01:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 480CD180053 for ; Sat, 7 May 2022 01:38:59 -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-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 ; Sat, 7 May 2022 01:38:58 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id k2so12921977wrd.5 for ; Sat, 07 May 2022 01:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=0IP/TAW7/MOGrKgspXABZ3EL0R1TaHonXnmJNWb19/Q=; b=aoe3cXZTvSRJjT9mKpRASmu4w+A1UYqT66DUtLeqk2BX5KY388UzaM2q3Aos6+ftpG 2ZPG6+NyuTsYJArtccTCP4eBKok2BUm0sYI95YjkkKBh2FzEMCOHXECnCsdocJKY1Heb fzbRx/i6fvXRJXWln9WgJhffv/GGKwS46GEkU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=0IP/TAW7/MOGrKgspXABZ3EL0R1TaHonXnmJNWb19/Q=; b=OYyXOi74NQLt10VB9z0gHo5BHVRAepEvlMW/dqiWWi/YMHKukctJapwMJ5oCjUwKeo IAIJdbeASGpmh/rYMQxvlpaNJ08k16Hevxb8SeH2kaG4ZCXq95tdThZHYjZ6G1wF9V3P gb5JwnDzdBHqOrFjPowFNoTvajGOjL0NNRjbJROBVniEcj3mrPRzk0KpAUzn9EvuwJhr sKQIctq95RhCNV7GG4D0X76C1EULDNmT1DcgNGemPWvqTMqWxZVmF5R1+qKax3PmIRfs Fh1MevTki4PWLQEBfZMD5oNptIMXxwQHhvrUVhb0KV7KPVvo3E3ZVSOH6hTxpKlu5a4y vsTg== X-Gm-Message-State: AOAM531EJdcksajaWvNLRi7xlgV6v5UfFNumFt2QVRRqHhErxJXAH/Up 5xab4gi0q3W0lG0BdahxPrQx1w== X-Google-Smtp-Source: ABdhPJykqtimNEJpV1TgANMpVI2TZqCwKxeg4pH3UwYRi84EBHo+RR7CxDGwHOt+RoWHCbLeWA6N+g== X-Received: by 2002:a5d:4205:0:b0:20a:e23c:a7f4 with SMTP id n5-20020a5d4205000000b0020ae23ca7f4mr6035898wrq.576.1651912737429; Sat, 07 May 2022 01:38:57 -0700 (PDT) Received: from smtpclient.apple ([94.173.138.98]) by smtp.gmail.com with ESMTPSA id 7-20020a05600c230700b003942a244edbsm7184402wmo.32.2022.05.07.01.38.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 May 2022 01:38:56 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_28322B56-20F1-45FE-A889-715F052907D0" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Date: Sat, 7 May 2022 09:38:51 +0100 In-Reply-To: Cc: PHP internals To: Jordan LeDoux References: X-Mailer: Apple Mail (2.3696.80.82.1.1) Subject: Re: [PHP-DEV] NULL Coercion Consistency From: craig@craigfrancis.co.uk (Craig Francis) --Apple-Mail=_28322B56-20F1-45FE-A889-715F052907D0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 7 May 2022, at 04:45, Jordan LeDoux wrote: >=20 > On Fri, Apr 8, 2022 at 10:35 AM Craig Francis = > wrote: > https://wiki.php.net/rfc/null_coercion_consistency = >=20 >=20 > 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. Not what I'm going for... but anyway, to get an idea of your position, = do you think the string '15' should be coerced to a number, or should it = fatal error as well? e.g. $my_number =3D round($request->get('my_number')); Craig --Apple-Mail=_28322B56-20F1-45FE-A889-715F052907D0--