mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
21 lines
226 B
PHP
21 lines
226 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)
|