代码思路如下:
public function __call($method, $args) {
return $this->redis->$method($args[0][,$args[1]][,$args[2]]...]);
}
请问如何实现 $this->redis->$method() 的参数列表根据 $args 变化而自动生成函数调用
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
给个思路
不就是变长参数列表嘛。