小编M B*_*ers的帖子

降级类php 5.6到5.5

我创建了一个用于堆栈对象层和闭包的类,但我的服务器还没有在php 5.6上运行.我想知道我怎么可以转换的...$parameters,因为我不能用替代一切修复它call_user_func_array()那么buildCoreClosure()方法将抛出错误,例如,由于关闭心不是一个数组...

class Stack
{
    /**
     * Method to call on the decoracted class.
     *
     * @var string
     */

    protected $method;

    /**
     * Container.
     */

    protected $container;

    /**
     * Middleware layers.
     *
     * @var array
     */

    protected $layers = [];

    public function __construct(Container $container = null, $method = null)
    {
        $this->container = $container ?: new Container;
        $this->method = $method ?: 'handle';
    }

    public function addLayer($class, $inner = true)
    {
        return $inner ? array_unshift($this->layers, $class) …
Run Code Online (Sandbox Code Playgroud)

php php-5.6 php-5.5

6
推荐指数
1
解决办法
726
查看次数

标签 统计

php ×1

php-5.5 ×1

php-5.6 ×1