xref: /PHP-7.3/Zend/tests/bug39036.phpt (revision 782352c5)
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--
17Notice: Undefined variable: key in %s on line %d
18NULL
19Done
20