
批改状态:合格
老师批语:
$username = '自定义内容';
function userName(string $value = ''):string
{
}
//使用外部变量,用use声明
function getItem(...$arr,$value){
return array_fiter($arr,function($item) use $value{
return $item>$value;
});
}
function userName(string $value = ''):string
{
return '你传的参数:' . value;
}
//调用函数
echo userName('参数');
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号