Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39293 invoked from network); 9 Jun 2018 14:26:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2018 14:26:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:56981] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/BE-62758-2A3EB1B5 for ; Sat, 09 Jun 2018 10:26:43 -0400 Received: from [192.168.2.114] ([79.222.35.93]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LwrwO-1gKRGt21fM-016Rpq; Sat, 09 Jun 2018 16:26:35 +0200 To: Dmitry Stogov , Gabriel Caruso , PHP Internals References: Message-ID: <5edffc76-33e7-9f56-83ab-c9ca129040a7@gmx.de> Date: Sat, 9 Jun 2018 16:26:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:Ne6t5/khHCbqhIUk8iOJBFWi2ZIwzer1KUYhg2umAcL/084T9Lf ethUJwDZnaB6MVD0vg6N4E8c6ViIC+U7BhchlXjjD1bULZsAh5r/KloY1te0cYHOUmqFhI+ Uf6EfR+0Ds9XOVfltzFV8RfQ4vKayZVKnKNFL44yNySoQJXXGFfNW1Ml5ea4XjTO9V2cNE9 V1Qe5RmWPsWYaU5EG+9eA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KJsxERyM6wM=:Ro6FxCOn6n+4l9W2+P/04h SZUTwIK7aSxD74gv1NzBFP1/MIIXQ8OS/elVDeQLhotmjtdeJ11I1X3AuU3BrIfjUTAH2KzTW 7NOfU7h0I2QoQTxWKWpik9srHkRfLpALiJth5Oe6yDopX7ATbi6QIWGORIOn5MJG3NATcaGaU /2FL/vGoRjPVwiY/ZcvgpgX+mitHI0hUtrWB1XmLpo1uXaDn2zXuG7p32NWquXtKnYWZbUyuz KGMa0dSNcF12HH8gTASNG8p5c48Vuj+dw84yRcXvyWeCLVW7s0rIclcd2cDS6mVGEX2yt55cs C4bRl+6sv8tJngXplr8y8EqhVBNkvsFrZh2JstdSx94qwHyOTO57wyiuswYESP/u1xgTl99lv QB/gaHKFSja5xPaWqqVrx+zok0r0ZifPDhDjOFKi2l6WoN/PDunfCDZNQ2Qtt/76DO3fGRRp3 lEEXmCEJBvQa+sES3sTFAD3jk0tdiW1RxhE5uYTzgkwkja3CqsjjBHOjcZfkkB6ZApJzYQGYC G+Ku/qARC+gck3Q1FQ4eUsWRyFiTSCG3WnNJEUUdsvKaNOiscjAlxm1uhxpnvwwAD3cNCkt60 pTgqg/hVTwVCA17gvAVGMZsxbaZ3JLUVb+iAYVDqqRNkSU5f9hWoWXya8SnUu7BwKcpN/bNXr Bixlo6aJENkdPEyrgGKjgz125gxUbUsgtaF4oCFeHA+DS9pyZDW6C3tcqC05RifgyzX1DIRy2 tOYnN+bS0SroUzUI4M/Wp5mWVpJXJuH/TYCoZjpvsGg58QvhhE5bnUO7Zw4+u3aLTxFPt2mQC YLodWMp Subject: Re: [PHP-DEV] [VOTE] Make compact function reports undefined passedvariables From: cmbecker69@gmx.de ("Christoph M. Becker") On 09.06.2018 at 12:03, Dmitry Stogov wrote: > compact(), extract(), parse_str() (with 1 argument) and get_defined_vars() are bad functions, because they access local variables indirectly. While I agree that extract() and parse_str() can be dangerous, I don't understand why compact() and get_defined_vars() are “bad”. If the issue is that these functions allow to access (local) variables by their name (given as string), that appears to be not uncommon in PHP; cf. variable variables and $GLOBALS. > They might be considered to be removed in the next major PHP version, despite of this fix. That would certainly require the RFC process, and in my opinion, a deprecation phase would be very appropriate. Note that parse_str() without second argument is already deprecated as of PHP 7.2.0 and scheduled for removal in the next major version[1]. [1] -- Christoph M. Becker