mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
23 lines
324 B
PHP
23 lines
324 B
PHP
--TEST--
|
|
GH-13569: GC buffer grows up to GC_MAX_BUF_SIZE when scanning WeakMaps
|
|
--FILE--
|
|
<?php
|
|
|
|
$wm = new WeakMap();
|
|
$objs = [];
|
|
for ($i = 0; $i < 30_000; $i++) {
|
|
$objs[] = $obj = new stdClass;
|
|
$wm[$obj] = $obj;
|
|
}
|
|
|
|
gc_collect_cycles();
|
|
|
|
$tmp = $wm;
|
|
$tmp = null;
|
|
|
|
gc_collect_cycles();
|
|
?>
|
|
==DONE==
|
|
--EXPECT--
|
|
==DONE==
|