xref: /PHP-8.4/Zend/tests/bug39036.phpt (revision 36935e42)
1--TEST--
2Bug #39036 (Unsetting key of foreach() yields segmentation fault)
3--FILE--
4<?php
5
6$key = 'asdf';
7
8foreach (get_defined_vars() as $key => $value) {
9    unset($$key);
10}
11
12var_dump($key);
13
14echo "Done\n";
15?>
16--EXPECTF--
17Warning: Undefined variable $key in %s on line %d
18NULL
19Done
20