Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112404 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26101 invoked from network); 4 Dec 2020 09:04:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Dec 2020 09:04:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8A87A1804DD for ; Fri, 4 Dec 2020 00:32:39 -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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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, 4 Dec 2020 00:32:39 -0800 (PST) Received: by mail-ej1-f53.google.com with SMTP id lt17so7510912ejb.3 for ; Fri, 04 Dec 2020 00:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Sv60o7M1ZA9h/Unet9ve5y+duQdSonuK2EzBCo0o3Q0=; b=BegjxjOZeo4uxU1NbHXdiwb9qI24XVvTqB6HoCat1vgUikiPbMcMmNB+3Y9MvkmaSt YH7+oWRet7bt2REJ3LLYwZPlVhIVC01Omq1Fhelr+ugNjuop3InWLgAQ4imnDQRwUaeC XIVChcghug8pZAh9CQTm4H4kf2+utOElRHj6gXo/VlRmRE1WuVgMC6UZlOeFHw5sNtQd cS4AA4AAtMAJLVQNPnKcmG8Pb7qDNCiRD8Drg3mEiTm1lX4nDh2VRdjCBoaS/zbWCXAc bVQ8yIJ4Ct0ubWgdSlzJZ5CjIkA2qik9tmzQxmYHiO5DqBrSoKvmp6PoOn/LBkleOvJZ lcaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Sv60o7M1ZA9h/Unet9ve5y+duQdSonuK2EzBCo0o3Q0=; b=ZXOKXS2Fah6VGshKwPtM3lpF43qf2BviJO/6T8a2W3EDIMOGizmJAnyw2E9WU03028 Fj2EVu5jAO4rJWoP1lW1KqbBW+pEQU2QLV+FVhq6UwgvNPqxKgHCtKKvw8lZ7/nAVrkn uZsWXQiKXU0B6OxkgR3dxdYFdBkxwW9Budp2u+HvtfJ6BEjg4FhmxDc32Fphy0+gdPWg ezOPnzY3hyIdnsk/0yNbRUQmK1tWTu7w2BVo5axr8xOnhkZ8Rxx6Gs8DLu+KR5zTOTtI suGGNC5o0iWO2HIL/41TZN83WyDjtgm0xxD+FPXBRuHfmS5sKob5/VMvbFQ4xllre7qH 8zyg== X-Gm-Message-State: AOAM531jR74yhtb5f1RhXHfc93e4DGgiSNpwkmT94MiELZt6So7rsDB7 A1BNYRIWo5mjTT7CH7cPZf8= X-Google-Smtp-Source: ABdhPJxw73Q3spqmILFxZ3MP0tRMHHzZSDvisrV9Yr1wJ1aSvNbYtOLD25U5V0PCjPbgdBMkQ5Vnyg== X-Received: by 2002:a17:906:60d4:: with SMTP id f20mr6253645ejk.156.1607070757234; Fri, 04 Dec 2020 00:32:37 -0800 (PST) Received: from claude.fritz.box ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id n7sm2978099edb.34.2020.12.04.00.32.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Dec 2020 00:32:36 -0800 (PST) Message-ID: <833C0509-8378-4881-98F0-5CD0AC9A649C@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_DBF93482-6F58-4D52-8050-105368A4D3DF" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Fri, 4 Dec 2020 09:32:35 +0100 In-Reply-To: Cc: PHP Internals To: Levi Morrison References: <34FA3E20-9D06-4D08-937E-4216FEF35504@gmail.com> <7E98C687-7A24-49E7-A14C-3D68B4B3419E@gmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [PHP-DEV] Missing warning for stat(), etc. when invoked with empty string From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_DBF93482-6F58-4D52-8050-105368A4D3DF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 3 d=C3=A9c. 2020 =C3=A0 22:05, Levi Morrison = a =C3=A9crit : >=20 > This is a long-standing behavior. Further, I don't know many people > who want _more_ warnings in their codebase. My guess is that this position was already discussed in the occasion of = the several past RFC whose main purpose was to introduce more = warnings/errors/exceptions? [1], [2], [3], etc. Apparently, many people = do want more warnings... But my main point is not exactly that. It is inconsistency in behaviour, = that leads to wrong assumptions, that leads to incorrect code. As = another example, see the faulty `@is_file( $data ) =3D=3D=3D false` = check mentioned in the other thread [4]. Precisely (and I realise that maybe I wasn=E2=80=99t explicit enough in = my message), the issue is that `stat("non/existent/file")` raises a = warning and returns false, that leads to the wrong assumption that = `stat($random_string)` raises a warning whenever it returns `false` = instead of an array, that leads to the deceptive confidence that the = `false` case will be always handled by the error handler. =E2=80=94Claude [1]: https://wiki.php.net/rfc/counting_non_countables = [2]: https://wiki.php.net/rfc/notice-for-non-valid-array-container = [3]: https://wiki.php.net/rfc/magic-methods-signature = [4]: https://externals.io/message/112333#112350 = = --Apple-Mail=_DBF93482-6F58-4D52-8050-105368A4D3DF--