go to bug id or search bugs for
EVERY TIME something is not what is expected to be, the error message should say both what it should have been, and what it was instead.
I f***ng hate when an error message gets so close to giving me the all the needed information, but it deliberately omits one tiny but crucial bit of detaildetail, that it would have cost nothing to include.
$b='this is a string';
The error message should be something like:
"Warning: array_intersect(): Argument #2 should be an array, string given instead"
The error message is:
"Warning: array_intersect(): Argument #2 is not an array"
WHY DON'T YOU TELL ME WHAT THE F*** IT IS?
Add a Patch
Add a Pull Request
Please stop shouting and being generally unpleasant in your bug reports.
I've opened a PR in Github (https://github.com/php/php-src/pull/3429) for discussion, not only changing the message for `array_intersect` but for most of array_ functions.
The previous mentioned PR was accepted and merged into PHP-7.3.