Skip to content

_\flatten not expand empty array inside passed array #13

@tooppoo

Description

@tooppoo

when I pass _\flatten an array which contains empty array, _\flatten does not expand the empty array.

ex.

use function _\flatten;

$arr = [
    [1, 2, 3],
    [],
    [4, 5, 6],
];
$result = flatten($arr);

I expected that $result is [1, 2, 3, 4, 5, 6], but actually [1, 2, 3, [], 4, 5, 6].

this behavior is expected?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy