分享 / 0 / 4 / 创建于 5年前
...是PHP的展开表达式,例子:
...
<?php function add($a, $b, $c) { return $a + $b + $c; } $operators = [2, 3]; echo add(1, ...$operators); ?>
官方文档:https://www.php.net/manual/zh/migration56....
类似于JS的展开对象
俗称 解构赋值
解构赋值
在php里这个叫 可变参数
可变参数
我要举报该,理由是:
...
是PHP的展开表达式,例子:官方文档:https://www.php.net/manual/zh/migration56....
类似于JS的展开对象
俗称
解构赋值
在php里这个叫
可变参数