!zend_array_is_list(array) can be used instead - it's internally used by https://php.net/array_is_list for PHP 8.1+
In PHP 8.2, the zend_array implementation was split into 2 implementations: (1) the original (aka MAP), (2) a separate, more memory efficient case (PACKED) for the representation of packed arrays - packed arrays only store the values, not the buckets
php: /msgpack-php/msgpack_pack.c:28: msgpack_check_ht_is_map: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed. Aborted (core dumped) Termsig=6