Re: [RFC] Deprecations for PHP 7.2

From: Date: Fri, 18 Nov 2016 21:04:33 +0000
Subject: Re: [RFC] Deprecations for PHP 7.2
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-97007@lists.php.net to get a copy of this message
Nikita Popov in php.internals (Fri, 18 Nov 2016 15:55:23 +0100): > https://wiki.php.net/rfc/deprecations_php_7_2 > >The RFC combines a number of deprecation and removal proposals. Each one >will get a separate 2/3 majority vote. The RFC overlaps with some recently >discussed topics (each, binary strings) I must have missed the discussion about each(). And this really surprised me: > The each() function is inferior to foreach in pretty much every > imaginable way, including being more than 10 times slower. But it is mentioned in a 9-year old comment in the manual: https://php.net/manual/en/function.each.php#75692 A quick grep in my Drupal7 source code showed that not everybody is aware of that. For instance, even the views module use a list() = each() construction: http://cgit.drupalcode.org/views/tree/includes/view.inc#n1740 This means that at least 800,000 sites use list() = each() at the moment. I am fine with deprecation, but this may be more wide spread than one might assume. -- Jan

« previous php.internals (#97007) next »