mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
20 lines
225 B
PHP
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)
|