php-src/Zend/tests/bug22836.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

33 lines
376 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'