Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121672 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 4261 invoked from network); 14 Nov 2023 13:46:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Nov 2023 13:46:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A51BD180504 for ; Tue, 14 Nov 2023 05:46:19 -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,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 (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 14 Nov 2023 05:46:19 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4084e49a5e5so48669885e9.3 for ; Tue, 14 Nov 2023 05:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; t=1699969577; x=1700574377; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JQWIHKXMog58wRcvQxF0BgAzA6Ly1wN3qnH1nFElxTg=; b=Kz8PvATX+IktX9vZ195zN7b7nvZ/QFmAXjJjaubiPtSW5Zw5NK2gDqqU1S/8/3xSTy gAWFyoWCYCyOEtN4oDrErdhfGcIFNW3xaHcu0XpIvKmaUwbefFlEnvCmU6nrCaqeMoI1 dzYj9sNvgbQv8pt/1LrmEKuoYH5sbHmaS63Jg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699969577; x=1700574377; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JQWIHKXMog58wRcvQxF0BgAzA6Ly1wN3qnH1nFElxTg=; b=Eycv1bFJdtx3/+41B1X3kia9C7ZqX21JC50OLsh80eFO8gorr10+i6UTGfqK8THUfH 2FWN4HEdiCHixYyNjebxM4A2l/E/Wl0mecSg6cioHfRUWIYfxRDP16zIirW07P0DmVcN PZUC4jJQandtSnyIi9tIzjwdISomDhJMyASD9IPXH/hBJCCcU7wjBWaA3aSwv3o7KLnP cvFTHD+in37NZ5xIUPWpReSSGTKCyfFEgtT7+gAvohgNdW5/BdrypqhDY4GJraiBB49t a+z3/VfWoxtcuUOHQ1hfofTh8GzyKiEaCPEJkznlP6u8tum8XHtXRBJwWCjht6O9c/Mr XFsg== X-Gm-Message-State: AOJu0YwbYRiE9aRpzwSwaqf9UEBNgv8fOwaRI6IYvuQF1LeEhlMpKO7z b7C5ycofq3nF0E1FSX2mjc1TmQ== X-Google-Smtp-Source: AGHT+IHko3scZTC9mYotjBcowYE5OhresH/QBmRpI84tL3zsBJA1/uakRxJ7+0xkRkpNh5MBl3d+yA== X-Received: by 2002:a05:600c:4f54:b0:40a:49bc:fa9d with SMTP id m20-20020a05600c4f5400b0040a49bcfa9dmr7966411wmq.26.1699969577559; Tue, 14 Nov 2023 05:46:17 -0800 (PST) Received: from smtpclient.apple ([92.238.103.248]) by smtp.gmail.com with ESMTPSA id u11-20020a05600c138b00b003fefaf299b6sm11512195wmf.38.2023.11.14.05.46.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2023 05:46:17 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) In-Reply-To: <0fe42819-e4dd-4329-b834-ed3295167e56@gmail.com> Date: Tue, 14 Nov 2023 13:46:06 +0000 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <5144806E-E21F-4AF8-B9A2-0161561A6B9E@craigfrancis.co.uk> <049d4758-def2-4a29-9e02-afa61e5b977e@gmail.com> <0fe42819-e4dd-4329-b834-ed3295167e56@gmail.com> To: Rowan Tommins X-Mailer: Apple Mail (2.3774.200.91.1.1) Subject: Re: [PHP-DEV] Passing null to parameter From: craig@craigfrancis.co.uk (Craig Francis) > On 10 Nov 2023, at 20:00, Rowan Tommins = wrote: > [...] Wherever it is used, "null" is a confusing and often = controversial concept. In different contexts, it is used for different = things, and has different ideal behaviours. It's a whole debate on its = own, and bringing in other types of coercion just confuses the = conversation. Thanks for the background detail Rowan, that is useful (I have re-read a = few times). I know I won't have a 2/3 support for NULL coercion with function = parameters, so I'll just wait until 9.0 is made available, and assuming = I'm correct (hopefully I'm not), we can address the BC problems then. For now, I'll just try to remember to do things like = `(trim(strval($search)) !=3D '')`, and hope that static analysis tools = move their NULL type check down to their lowest level: https://github.com/phpstan/phpstan/issues/10127 Craig