|
|
|
|
|
by nolok
2038 days ago
|
|
Reading the list of things that worry them makes it clear that it's not so much php is breaking bc than it is wordpress lack of cleaning and linting for so long catching up to them. I mean seriously the first thing they list as a worry is that arithmetic operators will now throw an error when one (and only one) of their operand is an array or resource (eg array + array support remains, it's really int + array or string + file_descriptor, things like that). This is literally a case that makes no sense in the code ever, not one of the "php used to do something magical for us" but "php used to keep silent about this buffonery", so if your code does that you have bigger worries ... Almost every single one of those things are easy to fix, in that it requires mostly time not much if any redesign, and almost every single one of those things are also deprecated or on their way out since at least a decade. |
|
I haven't personally used PHP in years, but was curious about this. Based on some quick/dumb experiments it appears int + array has thrown errors as far back as PHP4:
- http://sandbox.onlinephpfunctions.com/code/0b2f22ea881b36e58...
- http://sandbox.onlinephpfunctions.com/code/0e5fb752fc3ec28e8...
Is the post talking about some other scenario? Maybe the new thing is that it's now specifically a TypeError?