Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117328 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15434 invoked from network); 14 Mar 2022 17:40:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Mar 2022 17:40:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4984518053E for ; Mon, 14 Mar 2022 12:04:38 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.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,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (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 ; Mon, 14 Mar 2022 12:04:37 -0700 (PDT) Received: by mail-oi1-f176.google.com with SMTP id o64so18410316oib.7 for ; Mon, 14 Mar 2022 12:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20210112.gappssmtp.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=2uDQ30jyXtQpwlLvdTegkWRaAtPAom6F1URy+m9/wmI=; b=T5MYExGLsY2CGz5t58CVUdW7VU3DMhK2yrGuYmLVK4pp/kPZ/srQKF3Se/39jkFHAx wGZKMWRJ2FgBGgmfSGJMBrSEoCuqss6a+BM9fuZhdNy3Nz5smG2USEH0aprcikRzeHEu 16gRwQ3f3pbZBudiB9I87uhvAbg6G+YfK8VW1FGbyX9lWWQVKsXGIg+fLidh4ydofEKt sMxsy3rgPzrs4BQ54dvf/1xSK/Dt855+lre0wtfVci82Vm4rAdwouLHsZ/K9fjXco4l9 Rekqi3bQMNSxVgXvVg/ADM2HrHnWP1TWOltSYnilVFy1YP41uO2opz6NmYYEBDfOl5jx 4GVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=2uDQ30jyXtQpwlLvdTegkWRaAtPAom6F1URy+m9/wmI=; b=xZNXiyJJWWUY/mWiRJlGqeRqYQO/+3dVfRNbEGJV/iYt0a2WCUtc2EUH+0uw5n97/8 DejWKAh8LZxNWx/dy0rQed1I044GsTgWJW6OwSXwo809unAicsGhvLJSME/msyegY4ig n82ih11kfUGfg01LuVgibnGqpGLOovP9mJ2LIfmUid6L6Z9Yjhv39/wio9CLY3lQb7SN qWQHov01JQNtrsWNrS6TDApiuIxFEtqQknpAvySwtTnuo0JH64Oa1/kV54jYIlzGWaWB A0wV4xL9UMuEebQ8DV4+Lei8fglBG4QmTv7EbccycmMCI6Jquy4XGm3a0GfVgcP8Q7mj 2Ptw== X-Gm-Message-State: AOAM530H5m7kSEoxHbw/tZtvZphU+BydxFRpd6wVSrE5FLf5NHgHRLtd ehr/2IOg73+rQeOBqzZbqN4IoQ== X-Google-Smtp-Source: ABdhPJx6ysLfqFDGAu8q9/wje1dUl/tgIL/dr2Qc3XCQILsRGS9BG/mQa3ukVgz3qH6DmpU4H7meYA== X-Received: by 2002:aca:2119:0:b0:2ec:a7ff:c042 with SMTP id 25-20020aca2119000000b002eca7ffc042mr298710oiz.73.1647284676858; Mon, 14 Mar 2022 12:04:36 -0700 (PDT) Received: from [192.168.1.10] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id 4-20020a056870004400b000dabe0c435bsm4872104oaz.7.2022.03.14.12.04.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Mar 2022 12:04:36 -0700 (PDT) Message-ID: <5E019DDC-43D8-4676-9AA6-FBEF36A92FEF@newclarity.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_484980E4-3A87-46E6-BBDA-B913F66D5565" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Date: Mon, 14 Mar 2022 15:04:35 -0400 In-Reply-To: Cc: PHP internals To: Lynn , Kamil Tekiela References: <20220312031138.5e0669a4@platypus> X-Mailer: Apple Mail (2.3608.120.23.2.7) Subject: Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_484980E4-3A87-46E6-BBDA-B913F66D5565 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 12, 2022, at 5:44 AM, Lynn wrote: >=20 > Variable variables should be removed from PHP asap. It's 2022 and I = still > encounter bugs due to this "working" in legacy applications. > On Mar 12, 2022, at 5:48 AM, Kamil Tekiela = wrote: >=20 > +1 on removing variable variables as soon as possible. Variable variables provide functionality[1] that if removed would force = major rewrites of PHP applications that were architected in a way that = depends on that functionality.=20 And while probably between 90% and 99% of the time when someone uses = variable variables there are better alternatives, variable variables = make certain code possible that would be impossible without them. So, *assuming* removing variable variables is important enough to break = any the existing code that uses it =E2=80=94 sourcegraph.com reports[2] = 162.2k examples of its use =E2=80=94 PHP should at least add a function = that would allow getting the variables value by name. Something like = `get_variable_value_by_name($name)` but hopefully with a less verbose = name than I used in my example just now. #jmtcw -Mike [1] = https://stackoverflow.com/questions/16339658/php-variable-value-from-strin= g = [2] = https://sourcegraph.com/search?q=3Dcontext:global+lang:php+%5B%5E:%5C%5C%5= D%5C%24%5C%7B%5C%24++count:all&patternType=3Dregexp = --Apple-Mail=_484980E4-3A87-46E6-BBDA-B913F66D5565--