1--TEST-- 2Bug GH-9735 005 (Fiber stack variables do not participate in cycle collector) 3--FILE-- 4<?php 5 6class C { 7 public function __destruct() { 8 echo __METHOD__, "\n"; 9 } 10} 11 12function f() { 13 Fiber::suspend(); 14} 15 16$fiber = new Fiber(function () { 17 $c = new C(); 18 19 $fiber = Fiber::getCurrent(); 20 21 // Force symbol table 22 get_defined_vars(); 23 24 f(); 25}); 26 27print "1\n"; 28 29$fiber->start(); 30gc_collect_cycles(); 31 32print "2\n"; 33 34$fiber = null; 35gc_collect_cycles(); 36 37print "3\n"; 38 39?> 40--EXPECTF-- 411 422 43C::__destruct 443 45