php-src/tests/lang/returnByReference.001.phpt
2009-05-27 22:34:25 +00:00

20 lines
225 B
PHP

--TEST--
Returning a reference from a function
--FILE--
<?php
function &returnByRef(&$arg1)
{
return $arg1;
}
$a = 7;
$b =& returnByRef($a);
var_dump($b);
$a++;
var_dump($b);
?>
--EXPECT--
int(7)
int(8)