Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100667 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14259 invoked from network); 16 Sep 2017 09:49:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2017 09:49:20 -0000 Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; 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:50729] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/BD-19300-F93FCB95 for ; Sat, 16 Sep 2017 05:49:20 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xvSCb36rNzXMT for ; Sat, 16 Sep 2017 11:49:15 +0200 (CEST) To: internals@lists.php.net References: <097578bf-ab74-44cf-a465-dc6fdd50930f@Spark> <7005b428-1615-46c5-a2aa-a7406c17eeeb@Spark> Message-ID: <5058525d-ac79-5179-f847-9cc1f82ae316@rhsoft.net> Date: Sat, 16 Sep 2017 11:49:15 +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: <7005b428-1615-46c5-a2aa-a7406c17eeeb@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 16.09.2017 um 11:44 schrieb ilija.tovilo@me.com: > Dude, calm down. dude when people have no other hobbies than think about removing functionality for *no gain* > This was a request for feedback then you should withstand the feedback! why don't you spend your time for *add* features instead cripple things? > As other people have pointed out before > it may not be the best idea to remove it since there’s no good way to > write the equivalent code in PHP. No reason to be rude. > > On 16 Sep 2017, 11:42 +0200, lists@rhsoft.net , wrote: >> >> >> Am 15.09.2017 um 20:27 schrieb Arvids Godjuks: >>> well, basically, none. Results are from a Q6600 machine and under >>> windows, >>> so your mileage probably gonna be quite better :) >> >> well, and now implement the EXTR_SKIP in PHP code - that becomes a ugly >> piece of code and that only because someone likes to remove a already >> existing function nobody is forced to use? >> >> sadly i am not allowed to say what i think in public... >> >>> C:\Users\psihius\Documents\web>php -v >>> PHP 7.1.5 (cli) (built: May 9 2017 19:48:36) ( NTS MSVC14 (Visual C++ >>> 2015) x64 ) >>> Copyright (c) 1997-2017 The PHP Group >>> Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies >>> C:\Users\psihius\Documents\web>php -d memory_limit=-1 test.php >>> 6.884626150131226 - Creating arrays >>> 2.035606861114502 - foreach >>> 2.128609180450439 - extract >>> >>> The code: >>> >>> define('ITERATIONS', 10000000); >>> >>> $__time = microtime(true); >>> >>> $__array = $__array2 = []; >>> for ($__i = 0; $__i < ITERATIONS; ++$__i) { >>> $__array['a'.$__i] = $__i; >>> $__array2['b'.$__i] = $__i; >>> } >>> echo number_format(microtime(true) - $__time, 15, '.', ''), PHP_EOL; >>> >>> $__time = microtime(true); >>> foreach ($__array as $__key => $__variable) { >>> $$__key = $__variable; >>> } >>> echo number_format(microtime(true) - $__time, 15, '.', ''), PHP_EOL; >>> >>> $__time = microtime(true); >>> foreach ($__array2 as $__key => $__variable) { >>> $$__key = $__variable; >>> } >>> echo number_format(microtime(true) - $__time, 15, '.', ''), PHP_EOL;