1--TEST--
2Bug GH-9750 002 (Generator memory leak when interrupted during argument evaluation)
3--FILE--
4<?php
5
6function f(...$x) {
7}
8
9class C {
10    function __destruct() {
11        echo __METHOD__, "\n";
12    }
13}
14
15$gen = function ($c) use (&$gen) {
16    f(b: $gen, c: yield);
17};
18
19$gen = $gen(new C());
20
21foreach ($gen as $value) {
22    break;
23}
24
25$gen = null;
26$c = null;
27
28gc_collect_cycles();
29
30?>
31==DONE==
32--EXPECT--
33C::__destruct
34==DONE==
35