mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
33 lines
391 B
PHP
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'
|