Closed dktapps closed 1 year ago
Under normal circumstances, the table would be correctly allocated as an array: https://github.com/php/php-src/blob/50a2de78a8ef5c14c5f6b5167316bd04c1bb5aba/Zend/zend_object_handlers.c#L70
However, since ThreadedArray
has no properties, this code doesn't run.
If ThreadedArray is populated solely by using []=, the keys will be continuous, causing PHP to allocate the properties table as a packed array.
While this is fine for most cases, PHP 8.2 starts to distinguish between packed and assoc arrays, using separate data structures for each. Notably,
ReflectionClass->getProperties()
results in an assertion failure onThreadedArray
objects.