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