mirror of
https://github.com/php/php-src.git
synced 2024-11-29 21:04:10 +08:00
25 lines
493 B
Plaintext
25 lines
493 B
Plaintext
|
--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";
|
||
|
var_dump($x);
|
||
|
print "'$x'\n";
|
||
|
return ($a);
|
||
|
}
|
||
|
for ($i = 0; $i < 8; $i++) {
|
||
|
$h =& f();
|
||
|
}
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
string(3) "foo"
|
||
|
'foo'
|
||
|
|
||
|
Notice: Undefined variable: a in %s on line %d
|
||
|
|
||
|
Fatal error: Only variables or references can be returned by reference in %s on line %d
|