Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121674 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17666 invoked from network); 14 Nov 2023 18:03:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Nov 2023 18:03:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 54FC0180211 for ; Tue, 14 Nov 2023 10:03:16 -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-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 10:03:15 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2c594196344so76549511fa.3 for ; Tue, 14 Nov 2023 10:03:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; t=1699984993; x=1700589793; 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=XvCxGqN6fpENlDYj63ggdlQ/lDutwlYGjm9wj/dfVZE=; b=a9+LXFgY4rlYO7aGV2lbFlLUqzBzW/4zx/mAWCpHzrUJmEfWUpdZoQtkMkrQOQZAVV /1Lp29jLmHRSDaCCipHNeu6x08VDVd7jgwGWkpy5LFdXd9X32lPtdLWet75ZFFQ2Y7kI X85hlPg8jQqqJjPMIM4Tqk3bu/rfjZ0MMx2KI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699984993; x=1700589793; 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=XvCxGqN6fpENlDYj63ggdlQ/lDutwlYGjm9wj/dfVZE=; b=wgEHPcPcnRCHc9GicwbUruRkLfCo0iC/YQhz6qjv5rcTgjnXffAfQvmcIXBxLd1kmX JinlLryXgJsUKXfqfj9zSChpdxESfwUDkjJBs4qtTS7qmBVafujjzD9iyOLAD6FUHKkf Kdg1Ok98b5boy2MXkHC+5mM0LpgpWVBaDRWAQQKsBbKe7m87SC2hpndEZ+JQigwZuldt kSlDgdkuWcC18t/mFZtaVHipYwCCeJ6yrdpRlWN7oeHOifXQpRE+YK9YcI55OisOJk1p Y61Jsvia+cxrnx8xDZy2IhbDRoMftXNY/Mq6MBjpKUQvOCTe+ENE4MRmtTNsTlPQXFoR HkkA== X-Gm-Message-State: AOJu0Yy2HixjKYkzLt5ipJ2zaQ2AuWlFNMjMO+Y5nji+3Zmjk0s6P0MZ tUaBXxiyH6p6jK8rscKqd7YU7Q== X-Google-Smtp-Source: AGHT+IHwMQu+jXSqbVR3LbwAz+Dd6vcvvBOi/DAbrm42nnlOjU/EpGpoCRBANRsMI3gjzYYNuVauZg== X-Received: by 2002:a05:6512:3d0d:b0:506:87a3:c27c with SMTP id d13-20020a0565123d0d00b0050687a3c27cmr8224547lfv.53.1699984993338; Tue, 14 Nov 2023 10:03:13 -0800 (PST) Received: from smtpclient.apple ([92.238.103.248]) by smtp.gmail.com with ESMTPSA id i5-20020a5d4385000000b0032de6f95fb3sm8402785wrq.40.2023.11.14.10.03.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2023 10:03:12 -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: Date: Tue, 14 Nov 2023 18:03:02 +0000 Cc: Andreas Hennings , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Robert Landers X-Mailer: Apple Mail (2.3774.200.91.1.1) Subject: Re: [PHP-DEV] Array functions with strict comparison From: craig@craigfrancis.co.uk (Craig Francis) On 14 Nov 2023, at 17:49, Robert Landers = wrote: > One of the most beautiful things about PHP is that null =3D=3D 0 =3D=3D = false, or '5' =3D=3D 5 =3D=3D 5.0, or 1 =3D=3D true =3D=3D 'hello = world', which is so incredibly handy in web-dev that to ignore it is = inviting bugs. Headers may or may not be set, form values may or may not = be set, JSON documents may or may not be missing keys/values, etc. How = everything is coerced is extremely well documented and very obvious = after working with PHP for a while. Sorry, can't help myself... unless you dare to pass NULL to trim(), or = urlencode(), or htmlspecialchars(), or preg_match(), etc, etc. :-) Craig=