Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100661 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6056 invoked from network); 16 Sep 2017 09:35:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2017 09:35:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:14631] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/DB-19300-570FCB95 for ; Sat, 16 Sep 2017 05:35:50 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xvRw13gD7zXMT; Sat, 16 Sep 2017 11:35:45 +0200 (CEST) To: internals@lists.php.net References: <097578bf-ab74-44cf-a465-dc6fdd50930f@Spark> Message-ID: Date: Sat, 16 Sep 2017 11:35:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <097578bf-ab74-44cf-a465-dc6fdd50930f@Spark> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Deprecate the extract function in PHP 7.3 From: lists@rhsoft.net ("lists@rhsoft.net") Am 15.09.2017 um 19:20 schrieb ilija.tovilo@me.com: > Hi! > > The `extract` function takes an associative array and puts it into the local symbol table. > http://php.net/manual/en/function.extract.php > > ``` > $array = [ >     ‘foo’ => ‘foo’, >     ‘bar’ => ‘bar’, > ]; > > extract($array); > > print $foo; // "foo" > ``` > > As a second parameter the `extract` function takes some options to make this function less dangerous, like `EXTR_SKIP` that prevents an existing local variable of being overwritten. There’s a few more options, go ahead and take a look at the documentation. `EXTR_OVERWRITE` is the default one though. You can also pass a prefix for the variable names as a third argument. > > I seriously doubt the usefulness of this function then don't use it - who are you proposing remove functionality because you don't use it - fine, nobody forces you to do so - a foreach() replacement would miss EXTR_OVERWRITE - this whole thread is a "have solution, looking for a problem"