2003-07-30 01:56:50 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #22836 (returning references to NULL)
|
|
|
|
--SKIPIF--
|
|
|
|
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
function &f()
|
|
|
|
{
|
|
|
|
$x = "foo";
|
2004-02-10 17:15:01 +08:00
|
|
|
var_dump($x);
|
|
|
|
print "'$x'\n";
|
2005-05-28 00:18:07 +08:00
|
|
|
return ($a);
|
2003-07-30 01:56:50 +08:00
|
|
|
}
|
|
|
|
for ($i = 0; $i < 8; $i++) {
|
|
|
|
$h =& f();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
string(3) "foo"
|
|
|
|
'foo'
|
2004-02-10 17:15:01 +08:00
|
|
|
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'
|