array_column has worked on objects since 7.0, and it reads properties rather than calling getters — so it silently returns nothing for a well-encapsulated class. It does respect…
any switches the compiler off for that value and everything derived from it. unknown accepts anything and permits nothing until it has been narrowed. JSON.parse returns any, which…
3.7 shipped optional chaining in November and the objection got smaller. allowJs, checkJs and a per-file opt-in — and strictNullChecks, which is the flag that pays.
The @expectedException annotation asserts the exception happened somewhere in the method, which passes when it is thrown by the arrangement rather than by the thing under test. Placing…
Since 7.2 count() warns on anything that is not an array or Countable, and the guard everybody wrote by hand is now in the standard library. A generator…
Implementing ArrayAccess so a class can be used with square brackets makes it look like an array to every reader and to no static analyser. The interface predates…
6.0’s only real breaking change is that the global str_ and array_ functions are gone, and the replacement is one Composer package away. Installing the compatibility package is…