Yes, was warning / log previously, now it throws. So what was a warning and just going on is now an exception that interrupts.
Re:PHP 8
by Denvercoder9 on Thursday November 26, 2020 @04:03PM
(#25223506)
int + array has indeed been throwing errors for a while for the basic arithmetic operations, but not for slightly more complex operations such as modulo, and there are plenty more weird combinations that used to work:
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?