1--TEST--
2GH-11028 (Heap Buffer Overflow in zval_undefined_cv with generators) - other types variant
3--FILE--
4<?php
5function generator($x) {
6    try {
7        yield $x => 0;
8    } finally {
9        return [];
10    }
11}
12
13function test($msg, $x) {
14    echo "yield $msg\n";
15    try {
16        var_dump([...generator($x)]);
17    } catch (Throwable $e) {
18        echo $e->getMessage(), "\n";
19    }
20}
21
22test("null", null);
23test("false", false);
24test("true", true);
25test("object", new stdClass);
26?>
27--EXPECT--
28yield null
29Keys must be of type int|string during array unpacking
30yield false
31Keys must be of type int|string during array unpacking
32yield true
33Keys must be of type int|string during array unpacking
34yield object
35Keys must be of type int|string during array unpacking
36