protected function createSliceFunction()
    {
        return new ExpressionFunction(
            'slice',
            function ($array, $start, $length = null, $preserveKeys = false) {
                return sprintf('array_slice(%s, %s, %s, %s)', $array, $start, $length, $preserveKeys);
            },
            function ($arguments, $array, $start, $length = null, $preserveKeys = false) {
                return array_slice($array, $start, $length, $preserveKeys);
            }
        );
    }