Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117708 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76079 invoked from network); 9 May 2022 21:34:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 May 2022 21:34:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 67B99180211 for ; Mon, 9 May 2022 16:12:58 -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,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-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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, 9 May 2022 16:12:57 -0700 (PDT) Received: by mail-wm1-f52.google.com with SMTP id i20-20020a05600c355400b0039456976dcaso391758wmq.1 for ; Mon, 09 May 2022 16:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gBEEt/TDi5BaWMG5YpHZXq0AV8LqPHF8DVCSi0pp8v4=; b=MbQypP+0A23v/4QT7wDZxBPIR6n4EYqLhn6kom0k10oHuDmUnC56KUIzaL2HcWrcQ0 k/tG/drCLQZXqu595JFVX48U9S8clUTXA8YDmLfyBtpTbmffl8alKSCMYzka68zagFuB y5r/wMCb4J0mHIoErh+aoYE8sqzZKXM+5pHO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gBEEt/TDi5BaWMG5YpHZXq0AV8LqPHF8DVCSi0pp8v4=; b=xNdYI+3/RAUZtdrN9Dp5fSN8yhK2LF3JMHMwSo9PzpC49pXmhM3E1Zvre0aleiHgiO hJV0Mj9cL+g95m2UNMZpmI0vc9dKEUyvl9n0hih66A2Zo8QIOR76nure3v7memYkxEFT 0zUCwskcvJ3NH85hAaowjgHq1ITjt4sD2Gve0HUSUZyKhuC49ti3/prUZnax7LBDV7AK M+mDw+BHcl+JULVIN4eW+pXzK6KSymIAlXe/NS/BCqPjbZaYC6ljS/V7VbuWfCK+oTUG YytiiE2azNvPQHgkbwArP/ML3GUsALlYngAZuOrVdhZkBNLW/Mknl9xmjQzy3igIOZrg /llg== X-Gm-Message-State: AOAM5335W8J4cT2nkMhllGBpj307SuAj2wnU6TyXtTOXOXac5qh6RX5g 4IQODVgRVjuG3V7KPWG+pgzjtQmBPl96Eg== X-Google-Smtp-Source: ABdhPJwnBsNVyB84RYQ0IRwiOmusm8A0ovIUeHJw/osoIYzDgYxPDEXrR1LhHhKb0iCL3J2s0zgTNg== X-Received: by 2002:a05:600c:4e0e:b0:394:8a94:98a5 with SMTP id b14-20020a05600c4e0e00b003948a9498a5mr9684321wmq.124.1652137976500; Mon, 09 May 2022 16:12:56 -0700 (PDT) Received: from smtpclient.apple ([94.173.138.98]) by smtp.gmail.com with ESMTPSA id z11-20020a5d654b000000b0020c6b78eb5asm12295058wrv.68.2022.05.09.16.12.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 May 2022 16:12:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) In-Reply-To: <6277abaf.1c69fb81.64ce9.b86aSMTPIN_ADDED_MISSING@mx.google.com> Date: Tue, 10 May 2022 00:12:55 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <95143F62-DDE6-4DCC-82B7-C00C54446DD2@craigfrancis.co.uk> References: <5598bad8-4e1a-7638-d3aa-36b02568d1a8@alec.pl> <6277abaf.1c69fb81.64ce9.b86aSMTPIN_ADDED_MISSING@mx.google.com> To: Mark Randall X-Mailer: Apple Mail (2.3696.80.82.1.1) Subject: Re: [PHP-DEV] NULL Coercion Consistency From: craig@craigfrancis.co.uk (Craig Francis) On 8 May 2022, at 12:38, Mark Randall wrote: > On 08/05/2022 11:48, Jordan LeDoux wrote: >> This is not the case with null. If you use the unset() function on a >> variable for example, it will var_dump as null *and* it will pass an >> is_null() check *and* it will pass a $var =3D=3D=3D null *and* it = will return >> false for an isset() check. Null loses these qualities if it is cast = to >> *any* scalar. >=20 >=20 > Fortunately the writing is on the wall for the undefined cases, but = that doesn't take away from your argument. Yep, I agree, an exception for an undefined variable is probably fine... = I'm looking at variables specifically being set to to the NULL value, = and how that NULL value is coerced. Craig