Détermine si l'array donné est une liste.
Un tableau est considéré comme une liste si ses clés sont constituées de nombres consécutifs
de 0 à count($array)-1.
why is this faster you ask? because post-increment does more,
here is what pre-increment actually means: step 1: increment the value by 1. step 2: return the value.
here is what post-increment actually means: step 1: create a copy of the original value. step 2: increment the original value by 1. step 3: return the copy.
another question might be "why didn't you write `if ($k !== ++$i) {` ? ... that is a good question! turns out that ++$i;if($k!==$i){...} is faster on PHP7 than if($k !== ++$i){...} for reasons unknown to me.. (if you have an answer, feel free to email me about it!)
(i have NOT checked if PHP8/jit auto-optimize this stuff, but at least back in PHP7 it's true that pre-increment is faster than post-increment, and this polyfill is primarily for PHP7)