Feature request
In the below case, using array_pop makes phpstan believe the $headers value could be an empty array, when prior it knew that there were atleast 4 values.
array_pop always removes one element from the array and as such the second count() value could return int<3, max> in this case, and also persist the non-empty-array type.
https://phpstan.org/r/5003d274-3690-464e-a5e1-6e898cd00411
Feature request
In the below case, using
array_popmakes phpstan believe the$headersvalue could be an empty array, when prior it knew that there were atleast 4 values.array_popalways removes one element from the array and as such the secondcount()value could returnint<3, max>in this case, and also persist thenon-empty-arraytype.https://phpstan.org/r/5003d274-3690-464e-a5e1-6e898cd00411