Home  >  Article  >  Backend Development  >  A particularly good example of learning PHP reference return_PHP tutorial

A particularly good example of learning PHP reference return_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:35:24736browse

$a = 1;
function b(&$c)
{
    $c++;
    return $c;
}
$d=b($a);
$d++;
echo($a);

?>

 


$a = 1;
function &b(&$c)
{
    $c++;
    return $c;
}
$d=&b($a);
$d++;
echo($a);
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/508361.htmlTechArticle?php $a = 1; function b($c) { $c++; return $c; } $d=b($a); $d++; echo($a); ? ?php $a = 1; function b($c) { $c++; return $c; } $d=b($a); $d++; echo($a); ?...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn