可以只传$a和$c吗
<?php $a = new c;class c{
function __construct()
{
$this->f(1,,1);//会报错
} function f($a, $b = 'hello', $c)
{ if($a) echo $a;
if($b) echo $b;
if($c) echo $c;
}
}
?>Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
把$b放在最后一个参数