Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112408 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44102 invoked from network); 4 Dec 2020 11:57:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Dec 2020 11:57:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 975991804C9 for ; Fri, 4 Dec 2020 03:25:58 -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_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 03:25:58 -0800 (PST) Received: by mail-lj1-f170.google.com with SMTP id z1so6202910ljn.4 for ; Fri, 04 Dec 2020 03:25:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tcQH2pFiXmOrSDP/ps0xnlefGJ1aLlq9xQgtXYRXmS4=; b=rB6lZWFQNRF3zDG5WhDxYMyXJ8z6JCGMvNGKwLvJHK4CKLzjPQdhoaP5g43J6fW8At o3PbrH5lfgMnkRqSoOP5ILsvdy9DzAkHPKlVpmpMYGCzmTIW5SQ1JSDjPmd5jBLDmK+a vSDBYKgq7DZl/ePCEFtgnbqylJ5S4iFMsGZUnQjZnA84YP5Dhp9C9Ptmm0IUpKGhrhar W2NNYpo+yRmSBarykvs5K1l9ub33rtrJTGlaMJ8PgkfyPL7OMyj+PggTl7TrDaEIcV4H JcG6UyW8zEzaexIxmKKcr3n2k7rls6l5QoCJhgY6LJYjqw7nSjEfccFUO8GNXIROOYIw Iopw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tcQH2pFiXmOrSDP/ps0xnlefGJ1aLlq9xQgtXYRXmS4=; b=ADo1A+qvmg8aastjH+UHnIBIxDbOmfNChKNbFFZz1fETK/P1XP+oqibc6X6/9YWD+j v/1c4jqFWlEtXvq52yYx0MoyUxFyVeQL5+GHou8T22BoUQlmvtOsBjYGKH1isXYP7OJt uFBhQ7T+djEIlpDXsUXbFhYeOkbhz3aDb6xnwbOMtwjVgpS/cyo+VaNuubD5bIZrFUY3 A/aB1YMjivVSbQHoma5Pu6Pjf4WRDsyJf89ZgogPVn9q1vjEHtkkEzM9yKEYgKf2HyZM jwJYXe4JWvRGWwQ5z9lfzk6neBTuQRPI5zTDvpMwq7n8F5jtJsLiA7PnXJ/IEYn3S6GU jKyw== X-Gm-Message-State: AOAM530WacSVLMPxCLyMfG73xTMoGfm4rsgQI6GKOmmCCfu5cM0bZzXU mA57qQvPdKdiQSVwep4IIEu8CS9F6L+ZdqB3x2c= X-Google-Smtp-Source: ABdhPJwsMe65xlLCjSEkHe4Vcjm6PVNQ+us+5JOQrKWz5PpLQsihwCiuEHJ6dSbYa2pUFzS4CD9bTYn//3AXgz1Rekw= X-Received: by 2002:a2e:bc15:: with SMTP id b21mr3350513ljf.350.1607081153174; Fri, 04 Dec 2020 03:25:53 -0800 (PST) MIME-Version: 1.0 References: <34FA3E20-9D06-4D08-937E-4216FEF35504@gmail.com> <7E98C687-7A24-49E7-A14C-3D68B4B3419E@gmail.com> <833C0509-8378-4881-98F0-5CD0AC9A649C@gmail.com> In-Reply-To: <833C0509-8378-4881-98F0-5CD0AC9A649C@gmail.com> Date: Fri, 4 Dec 2020 12:25:37 +0100 Message-ID: To: Claude Pache Cc: Levi Morrison , PHP Internals Content-Type: multipart/alternative; boundary="000000000000429fa005b5a1bdb0" Subject: Re: [PHP-DEV] Missing warning for stat(), etc. when invoked with empty string From: nikita.ppv@gmail.com (Nikita Popov) --000000000000429fa005b5a1bdb0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 4, 2020 at 9:33 AM Claude Pache wrote: > > > > Le 3 d=C3=A9c. 2020 =C3=A0 22:05, Levi Morrison a > =C3=A9crit : > > > > 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 d= o > want more warnings... > This is getting a bit off-topic, but I think it's necessary to clarify: What many of us actually want is *less* warnings. Having less warnings can take the form of converting them to exceptions, or take the form of removing them entirely. Both of these things happen, but the conversions to exceptions tend to be the more controversial and thus take the spotlight. I'm personally not a fan of warnings thrown by stream/FS functions (especially when backed by socket streams), as robust code just ends up having to suppress them all. Unfortunately I can't say that these warnings are entirely useless, as they *are* helpful for debugging. It would be nice if PHP had a stronger separation between "this is an error" warnings and "this is informational" warnings. Things are slowly moving in this direction with the first category being partially converted into exceptions... But well, that's a global problem. The current stance of stream/FS functions is very much that all error conditions should warn. Regards, Nikita --000000000000429fa005b5a1bdb0--