1--TEST--
2finally is run on object dtor, not free
3--FILE--
4<?php
5
6function gen() {
7    try {
8        yield;
9    } finally {
10        var_dump($_GET);
11    }
12}
13
14$gen = gen();
15$gen->rewind();
16
17set_error_handler(function() use($gen) {});
18
19?>
20--EXPECT--
21array(0) {
22}
23