Hi,

On Tue, Jan 21, 2020 at 6:17 PM Nikita Popov <nikita....@gmail.com> wrote:

>
> In the cases you encountered, do you know what type count() was used on?
> Was it null? false? Or something else?
>
> Nikita

we were in a similar boat as Björn to the point where we manually
patched PHP in production in order to not emit that warning so we
could update PHP while we were migrating the code-base. This made the
7.1 to 7.2 update the most painful update in the history of this
application (which was first released when 5.0.0 came out).

The most common case was `count(null)` which unfortunately was
happening all the time because of functions deciding to return an
array with elements or null if there was no elements to be found. Yes,
that's bad form, but hey - this is a nearly 20 years old application.

Of all the changes I've seen happening in PHP, this was the most painful.

Philip

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

Reply via email to