1--TEST-- 2Memleaks if unserialize return a self-referenced array/object 3--INI-- 4report_memleaks=1 5--FILE-- 6<?php 7function foo() { 8 gc_collect_cycles(); 9} 10 11$str = 'a:1:{i:0;R:1;}'; 12foo(unserialize($str)); 13$str = 'a:1:{i:0;r:1;}'; 14foo(unserialize($str)); 15echo "okey"; 16?> 17--EXPECTF-- 18Warning: unserialize(): Error at offset 13 of 14 bytes in %s on line %d 19okey 20