b0y-101 Mini Shell


Current Path : E:/www/b-group.old/spfin - Copy/testpayment/src/xdebug/tests/gcstats/
File Upload :
Current File : E:/www/b-group.old/spfin - Copy/testpayment/src/xdebug/tests/gcstats/xdebug_gc_stats-010.phpt

--TEST--
GC Stats: Disabling Zend GC during the script
--SKIPIF--
<?php
require __DIR__ . '/../utils.inc';
check_reqs('PHP >= 7.3');
?>
--INI--
xdebug.mode=gcstats
xdebug.start_with_request=yes
zend.enable_gc=1
report_memleaks=0
--FILE--
<?php

function foo()
{
	bar();
}

function bar()
{
	for ($i = 0; $i < 20000; $i++) {
		$a = new stdClass();
		$b = new stdClass();
		$b->a = $a;
		$a->b = $b;
		unset($a, $b);
	}
}

foo();

gc_disable();

xdebug_stop_gcstats();

$lines = file(xdebug_get_gcstats_filename());

unlink(xdebug_get_gcstats_filename());

var_dump(count($lines) >= 6);
?>
--EXPECTF--
Xdebug: [GC Stats] PHP's Garbage Collection is disabled at the end of the script
bool(true)

Copyright © 2019 by b0y-101