Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106950 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10400 invoked from network); 12 Sep 2019 16:30:49 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 12 Sep 2019 16:30:49 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id DF9562C8725 for ; Thu, 12 Sep 2019 07:06:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FREEMAIL_REPLY, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: X-Spam-Virus: No Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 12 Sep 2019 07:06:43 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id q11so4527973lfc.11 for ; Thu, 12 Sep 2019 07:06:43 -0700 (PDT) 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=2fngVVfJ44qb1EE0vJTKWnEMhae3bUX5yWU1i+RjIds=; b=XXjiIPebw3APXtQefILNZqHEysFSNhH4t4mZHa2KCyVbBxO1UEo26OdVj2eb/GUddD Vh1RqvDqmUlrK2yvCKP8ChilLDQ7mmCGZsQjn5SrnirN8dvxRM/1+Hy1usB+MSGHxue1 7DQQjOIdz4YKXMXiLAw/tuiQ8TTFCvma4CuY3rL//fVFfPwdWm4uYz5zoMNpWVAIjWrN gxjhtdWWybYezj/GtvHgQBfe2lWQQNGCMe2Dkr44RMbli77tSdsZit7omudEey6PCmk6 RZmzgw6BkD3pCxLpCjz8p0ewxJp5H+HPBBbITNLqwCodsXYhXtrhMQiVcJ+yXwj7Mi+l y65A== 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=2fngVVfJ44qb1EE0vJTKWnEMhae3bUX5yWU1i+RjIds=; b=mj0UIZPK1OiAY0qjqIwWNmkfpVYZNnvvEMusRs3j0vI7sLK+b4MSHl3PaE3Eq6WPnz lQxbSFcsKH4PlwtvbMulxUoHaDnybQKhvjKYwI4zWpzgWtQTXQ1Zik1ZGFCH0r9ONC0Y N0lUqVyIbNt1kXzSad4crB3u+bxubYk8aA4YGXwHIDRG/GTRaU83FRxPrWiFV7c0ZVjT c7G6p0NuKTNuLDbtDDqBZsMOpKMW3e3IoD/LPz0NbTLHp6UF2TXcbIQtrVh4/c6VgpAI rorFEmRfXHDcUDeK/fjxkXK3zY/66snNTGekBJgr6HxuctombqNhsaJM/Jsto9SrS+Fk WZlw== X-Gm-Message-State: APjAAAWOlWOenp8eLDfG3kwgnO+4oWw/2BUZXXfRIfYsWOzfCxCNXIlU kIRZ0TdDwZ87jn5P09iL1TV1AUEjsJQszTla9dA= X-Google-Smtp-Source: APXvYqzOxH+xypbxOcplejpTk9yj7RH24jv/nlo+bQugDgJODMXfFueFseFcsE0kGkFFlfqgIPgLMS8q5HgH/RSUDNU= X-Received: by 2002:ac2:46f8:: with SMTP id q24mr27943406lfo.51.1568297201997; Thu, 12 Sep 2019 07:06:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 12 Sep 2019 16:06:15 +0200 Message-ID: To: Chase Peeler Cc: Claude Pache , Marco Pivetta , Rowan Tommins , PHP internals Content-Type: multipart/alternative; boundary="000000000000a09d2d05925ba5dd" X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: arvids.godjuks@gmail.com (Arvids Godjuks) --000000000000a09d2d05925ba5dd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D1=87=D1=82, 12 =D1=81=D0=B5=D0=BD=D1=82. 2019 =D0=B3. =D0=B2 16:02, Chase= Peeler : > On Thu, Sep 12, 2019 at 9:55 AM Claude Pache > wrote: > > > > > > > > Le 12 sept. 2019 =C3=A0 15:33, Marco Pivetta a = =C3=A9crit : > > > > > > $foo[$key1][$key2] =3D ($foo[$key1][$key2] ?? 0) + 1; > > > > > > Marco Pivetta > > > > That violates blatantly DRY (twice the exact same lengthy expression > > `$foo[$key1][$key2]`), so it is not a satisfactory solution. > > > > And that's why PHP is so awesome. You don't have to do all these stupid > tricks just to do something simple like increment a counter. But, it look= s > like we're going to throw that out of the window because some people thin= k > that since they like doing it like the way above, everyone should have to= . > > > =E2=80=94Claude > > > > > > -- > Chase Peeler > chasepeeler@gmail.com > Easy, because experience shows that leads to bugs and lots of them. Security issues even. If you want to write predictable code - you have to init your variables/arrays. And check for existence/null. If fixed at least a few dozen bugs in my system I took over in the last few months specifically because of undefined variables or indexes. It works for small stuff, but when you have a codebase with 100+k LOC and more, you have to go strict or it starts to cost a lot of money and personnel to keep things running along. --=20 Arv=C4=ABds Godjuks +371 26 851 664 arvids.godjuks@gmail.com Skype: psihius Telegram: @psihius https://t.me/psihius --000000000000a09d2d05925ba5dd--