Skip to content

Commit

Permalink
Merge pull request #28662 from awais-vteams/5.8
Browse files Browse the repository at this point in the history
[5.8] Arr::collapse better performance
taylorotwell authored May 30, 2019
2 parents 0a12baf + 070ac46 commit a5b8f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Support/Arr.php
Original file line number Diff line number Diff line change
@@ -55,10 +55,10 @@ public static function collapse($array)
continue;
}

$results = array_merge($results, $values);
$results[] = $values;
}

return $results;
return array_merge([], [], ...$results);
}

/**

0 comments on commit a5b8f74

Please sign in to comment.