Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107029 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97513 invoked from network); 13 Sep 2019 00:30:32 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 13 Sep 2019 00:30:32 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 32C452D1FC4 for ; Thu, 12 Sep 2019 15:06:32 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (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 15:06:31 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id 205so16830708pfw.2 for ; Thu, 12 Sep 2019 15:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=rMFE1gGRRcn2FD8bcBfHsz9o6fenqUqVghgAoxmfydw=; b=FqyeJzW7zH2hyORU2lxscV4FeY6iKpa0pIZ5m1qXr/O3rANKmROtEm9/qNuf9R2NNt hiYQ9q58ZMPXH3aA7IlHdRYnUjd9yMDifofUxMh6gbFosHwcGNcqT9W787vwIQXrnbHD UqD/R7RxIJCAezf9HfO74LTiQ5058BSBXx1h5g3uS6kr3nShuRJVU+uJoMEJ1WWl60Up TaVkqs1VnrUSPNgwdn/vEvb1N2hJZeBcs6oR7MG0oUCAcLcEuuaJTa/7z18qeUdRt8M7 tA1b3LhO2X+j4qyhAPsKxj0+I4/vAvFpGO6iO/8RxxrXqOzYUTFIbFkR2TJtT7R/CY7w lejg== 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=rMFE1gGRRcn2FD8bcBfHsz9o6fenqUqVghgAoxmfydw=; b=tFVm/vSdEFdiVW5xfLgSJQNXwDCg+zMIbgVUH8Zrt9r0CYy0zwF+2wkOPM2pFX8YC+ F77TppNISUA3z3L8H40hWV7vs6Bme/pQR6pmjUoOzs+n6GxPjBR3mDxywnJRzinx//NG g4Wn4cI5nfVr7d6qveCuWXe66UELIs2P0vlKs3SFKYWFIKxSOtIsXy8s1b7kBZ2mS7OY IQ7MbkAS5oIKxL4fNqlg1fm/arlaKLCmWd1r5qVADfMPfFGNwD7t+TRjLkjHDd5R1bAY DTWFibXx/SqnmjXU8+iHo81lde17B4PGcks9v00x8LxlANnRcCLRYzfUaTOe0ZbTgRPz ZjCw== X-Gm-Message-State: APjAAAUxh7wmAaCThTR6jDcA3WaIlbtpH0OpYgOIrwuLPKx/F8dF61vu ajeFnq/RuAPip1TmMNIIbaWu/Q== X-Google-Smtp-Source: APXvYqy7KUclVExjOHSkAqEpZ0++S9ymY88D6o8eB8Fb97LHNNdWdR2U9FoqCsLvTnQomKBpOfsjQg== X-Received: by 2002:a17:90a:9f0b:: with SMTP id n11mr1065368pjp.102.1568325990613; Thu, 12 Sep 2019 15:06:30 -0700 (PDT) Received: from [192.168.101.137] (50-252-183-45-static.hfc.comcastbusiness.net. [50.252.183.45]) by smtp.gmail.com with ESMTPSA id u4sm23588572pfh.55.2019.09.12.15.06.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2019 15:06:29 -0700 (PDT) Message-ID: <16AF0744-80CF-4245-B8F7-2A841C2461E1@newclarity.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_0A8181CB-5643-4D5C-8626-6FC6070CFA63" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Thu, 12 Sep 2019 15:06:27 -0700 In-Reply-To: Cc: PHP Internals List To: Chase Peeler References: <076701d56978$86020910$92061b30$@php.net> <078e01d5697c$5512bc10$ff383430$@php.net> <31BD63BC-ACE0-4478-B241-E698D2D6F59C@newclarity.net> X-Mailer: Apple Mail (2.3445.104.11) X-Envelope-From: Subject: Re: [PHP-DEV] Changing fundamental language behaviors From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_0A8181CB-5643-4D5C-8626-6FC6070CFA63 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > It's not a matter of won't upgrade, but that they can't upgrade. If = Wordpress decides to take their time supporting PHP 8, wordpress users = won't have any option but to wait on upgrading. To be clear, WordPress core upgrading to support PHP won't be a big = issue. And WordPress core code has actually improved significantly in = recent years. Upgrading the ~68,000 open source plugins available on wordpress.org = , thousands of commercial plugins, and and an = untold number of custom-developed bespoke plugins and custom themes is = where the concern lies.=20 -Mike > On Sep 12, 2019, at 11:14 AM, Chase Peeler = wrote: >=20 >=20 >=20 > On Thu, Sep 12, 2019 at 2:10 PM Lynn > wrote: > On Thu, Sep 12, 2019 at 7:59 PM Mike Schinkel > wrote: >=20 > > > > > > Just a few weeks ago I was refactoring some particularly horrible = code > > developed by previously employed developers =E2=80=94 a code based = that has a 1400 > > line function and many other functions 100s of lines long, and I = added some > > initialization for variable and array elements prior to their use. > > > > Unfortunately my changes broke the code because the original = developer > > using isset($var) as branching criteria. After finding this bug, I > > realized that this code base uses that technique frequently. I am = know > > from lots of experience that this is a common technical among = WordPress > > plugins. > > > > > The bug is not that you initialized the variable, it's that you = initialized > it with a different value: https://3v4l.org/8mB8B = > ``` > var_dump(isset($a)); > $a =3D null; > var_dump(isset($a)); >=20 > // gives > bool(false) > bool(false) > ``` >=20 > Whenever one of these errors will occur, you can initialize either the > array key or variable with null and it will work again without = changing > behavior. If anything, Wordpress shouldn't be an argument to not = improve > PHP, though I think it's important to consider the impact of a change, > including for the Wordpress community. However, I think most people = agree > that the quality of Wordpress code and Plugins is highly debatable. I = don't > like the idea of not being able to progress because Wordpress users = won't > upgrade PHP. >=20 > It's not a matter of won't upgrade, but that they can't upgrade. If = Wordpress decides to take their time supporting PHP 8, wordpress users = won't have any option but to wait on upgrading. > =20 > Regards, > Lynn van der Berg >=20 >=20 > --=20 > Chase Peeler > chasepeeler@gmail.com --Apple-Mail=_0A8181CB-5643-4D5C-8626-6FC6070CFA63--