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