private function isAssocArray($item): bool
    {
        if (!is_array($item)) {
            // Is not an array at all
            return false;
        }

        if ($item === []) {
            // Treat empty array as Sequential
            return false;
        }

        // Check if keys are equal to sequence of 0 .. n-1
        return array_keys($item) !== range(0, count($item) - 1);
    }
private function isAssocArray($item): bool
    {
        if (!is_array($item)) {
            // Is not an array at all
            return false;
        }

        if ($item === []) {
            // Treat empty array as Sequential
            return false;
        }

        // Check if keys are equal to sequence of 0 .. n-1
        return array_keys($item) !== range(0, count($item) - 1);
    }
private function isAssocArray ( $ item ) : bool { if ( ! is_array ( $ item ) ) { // Is not an array at all return false ; } if ( $ item === [ ] ) { // Treat empty array as Sequential return false ; } // Check if keys are equal to sequence of 0 .. n-1 return array_keys ( $ item ) !== range ( 0 , count ( $ item ) - 1 ) ; }
Checks if item is associative array type.

@param mixed $item

@return bool
Checks if item is associative array type .