public static function flatten (array $sequence)
    {
        $flat = array();
        array_walk_recursive($sequence, function ($element) use (&$flat) { $flat []= $element; });
        return $flat;
    }
public static function flatten (array $sequence)
    {
        $flat = array();
        array_walk_recursive($sequence, function ($element) use (&$flat) { $flat []= $element; });
        return $flat;
    }
public static function flatten ( array $ sequence ) { $ flat = array ( ) ; array_walk_recursive ( $ sequence , function ( $ element ) use ( & $ flat ) { $ flat [ ] = $ element ; } ) ; return $ flat ; }
Flatten sequence.

@param  array $sequence Sequence
@return array Flattend sequence
Flatten sequence .