php-src/Zend/tests/bug22836.phpt
2020-02-03 22:52:20 +01:00

33 lines
391 B
PHP

--TEST--
Bug #22836 (returning references to NULL)
--FILE--
<?php
function &f()
{
$x = "foo";
var_dump($x);
print "'$x'\n";
return ($a);
}
for ($i = 0; $i < 8; $i++) {
$h =& f();
}
?>
--EXPECT--
string(3) "foo"
'foo'
string(3) "foo"
'foo'
string(3) "foo"
'foo'
string(3) "foo"
'foo'
string(3) "foo"
'foo'
string(3) "foo"
'foo'
string(3) "foo"
'foo'
string(3) "foo"
'foo'