1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/Zend/tests/bug39036.phpt
Máté Kocsis 36935e42ea Improve undefined variable error messages
Closes GH-5312
2020-03-31 13:02:32 +02:00

20 lines
284 B
PHP

--TEST--
Bug #39036 (Unsetting key of foreach() yields segmentation fault)
--FILE--
<?php
$key = 'asdf';
foreach (get_defined_vars() as $key => $value) {
unset($$key);
}
var_dump($key);
echo "Done\n";
?>
--EXPECTF--
Warning: Undefined variable $key in %s on line %d
NULL
Done