On 10/30/2016 05:31 AM, Rasmus Schultz wrote:
On second thought, I agree with that - changing reset() and end()
doesn't make sense, because people know them and expect them to work
in a certain way. Likely a lot of people would actually continue to
use them with intermediary variables the way they do today.

Today?

In PHP 5.6.x I didn't have to use intermediate variables.

Being required to use them was new with PHP 7 and I suspect you will find a lot of sites still using pre 7 because they haven't taken the time to make sure every app they run works in PHP 7.

All my production servers still run 5.6.x for that reason, I'm only now starting to port the apps I can now that it appears the PECL modules I need have finally all been updated.

The php apps I am fixing are currently littered with code like this:


$SEVENFIX = explode('.', $rs[0]->cover);
if(end($SEVENFIX) == "whatever") {
  // do stuff
}

before trying the app in my 7.1.0RCx test servers they worked just fine as

if(end(explode('.', $rs[0]->cover)) == "whatever") {
  // do stuff
}

So I suppose some people might "continue" to use them with intermediary but a lot of code that hasn't been ported to 7 doesn't currently.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to