mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 03:37:44 +08:00
Fixed Arr::flatten , INF is float not int.
This commit is contained in:
parent
fd87f9d729
commit
cc812ad732
@ -168,7 +168,7 @@ class Arr
|
|||||||
/**
|
/**
|
||||||
* Flatten a multi-dimensional array into a single level.
|
* Flatten a multi-dimensional array into a single level.
|
||||||
*/
|
*/
|
||||||
public static function flatten(array $array, int $depth = INF): array
|
public static function flatten(array $array, $depth = INF): array
|
||||||
{
|
{
|
||||||
$result = [];
|
$result = [];
|
||||||
foreach ($array as $item) {
|
foreach ($array as $item) {
|
||||||
|
Loading…
Reference in New Issue
Block a user