<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<?php
function &example($tmp=0)
{
return $tmp;
}
$str=&example("腾讯科技");
echo $str."<p>";
?>
</body>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<?php
function &example($tmp=0)
{
return $tmp;
}
$str=&example("腾讯科技");
echo $str."<p>";
?>
</body>
</html>
这里其实看不出来有啥大用途
取消引用
$num=789;
$math=&$num;
echo"\$math is :".$math."<br>";
unset($math);
echo"\$math is:".$math."<br>";
echo"\$num is:".$num;
只是取消了他们之间的关系,并没有销毁内容