Re: [RFC] Deprecate the extract function in PHP 7.3

From: Date: Sat, 16 Sep 2017 09:49:15 +0000
Subject: Re: [RFC] Deprecate the extract function in PHP 7.3
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-100667@lists.php.net to get a copy of this message
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 <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;


« previous php.internals (#100667) next »