Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100665 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11430 invoked from network); 16 Sep 2017 09:42:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2017 09:42:16 -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:44573] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/1D-19300-8F1FCB95 for ; Sat, 16 Sep 2017 05:42:16 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3xvS3S3SQgzXMT for ; Sat, 16 Sep 2017 11:42:12 +0200 (CEST) To: internals@lists.php.net References: <097578bf-ab74-44cf-a465-dc6fdd50930f@Spark> Message-ID: Date: Sat, 16 Sep 2017 11:42:12 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit 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 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;