--TEST-- GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state (packed array) --SKIPIF-- --INI-- memory_limit=2M --FILE-- 0; --$i) { $a[] = 2; } fwrite(STDOUT, "Success"); }); $a = []; // trigger OOM in a resize operation while (1) { $a[] = 1; } ?> --EXPECTF-- Success Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d