Tools/Evaluator/CustomExpressionLanguageProvider.php
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);
            }
        );
    }
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);
            }
        );
    }
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 ) ; } ) ; }
Returns the sequence of elements from an array based on start and length parameters.

@return ExpressionFunction
Returns the sequence of elements from an array based on start and length parameters .