Skip to content

Commit

Permalink
use array_is_list if available
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Apr 6, 2024
1 parent 985fb71 commit 2da77c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Util/CurveArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public static function isAssoc(array $array): bool
return false;
}

if (function_exists('array_is_list')) {
return !array_is_list($array);
}

if (isset($array[0])) {
$n = count($array) - 1;

Expand Down

0 comments on commit 2da77c4

Please sign in to comment.