php面试题,请写出以下php代码输出什么?
的有关信息介绍如下:有缺陷。
改前输出:This is a string,
改后输出:This is a string, and something extra.
function add_some_extra($string)
{
$string .= 'and something extra.';
return $string;
}
$str = 'This is a string, ';
$str = add_some_extra($str);
echo $str;
输出'This is a string, and something extra.'