- str_repeat: documentation ( source)
- gc_collect_cycles: documentation ( source)
- gc_enable: documentation ( source)
<?php
$counter = 1000;
gc_enable();
while($counter--) {
$obj = new stdClass;
$obj->obj = $obj;
$obj->string = str_repeat(1, 1024 * 10);
gc_collect_cycles();
}