请问PHP5.5如何实现下面的方法?
function mb_convert_variables($to_encoding, $from_encoding, &...$vars) {
}
请问PHP5.5如何实现下面的方法?
function mb_convert_variables($to_encoding, $from_encoding, &...$vars) {
}
PHP 官方文档
Function arguments
Finally, variable arguments can also be passed by reference by prefixing the ... with an ampersand (&).
2 回答1.5k 阅读✓ 已解决
1 回答1.3k 阅读✓ 已解决
2 回答920 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
2 回答986 阅读
1 回答957 阅读
1 回答879 阅读
PHP 5.5 哪来的可变参数?这是 5.6 的新特性,老老实实
func_num_args() / func_get_args()
拿来当数组处理吧。