php-src/Zend/tests/bug79828.phpt

18 lines
393 B
Plaintext
Raw Normal View History

2020-07-13 15:55:13 +08:00
--TEST--
Bug #79828: Segfault when trying to access non-existing variable
--FILE--
<?php
function foo(): AnyType {
return $uninitialized;
}
foo();
?>
--EXPECTF--
Warning: Undefined variable $uninitialized in %s on line %d
Fatal error: Uncaught TypeError: foo(): Return value must be of type AnyType, null returned in %s:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
thrown in %s on line %d