private static function isCompactableArray($value, $integerKeysIncluded)
    {
        if (!is_array($value)) {
            return false;
        }
        reset($value);
        $firstKey = key($value);
        if (!$integerKeysIncluded && self::isInteger($firstKey)) {
            return false;
        }
        next($value);
        return key($value) === null; // if the array only has one key, then the second key is null.
    }
private static function isCompactableArray($value, $integerKeysIncluded)
    {
        if (!is_array($value)) {
            return false;
        }
        reset($value);
        $firstKey = key($value);
        if (!$integerKeysIncluded && self::isInteger($firstKey)) {
            return false;
        }
        next($value);
        return key($value) === null; // if the array only has one key, then the second key is null.
    }
private static function isCompactableArray ( $ value , $ integerKeysIncluded ) { if ( ! is_array ( $ value ) ) { return false ; } reset ( $ value ) ; $ firstKey = key ( $ value ) ; if ( ! $ integerKeysIncluded && self :: isInteger ( $ firstKey ) ) { return false ; } next ( $ value ) ; return key ( $ value ) === null ; // if the array only has one key, then the second key is null. }
Whether the array is "compactable".

An array is compactable if it has only one key that is not an integer or integer-like string.

@param mixed $value
@param bool $integerKeysIncluded
@return bool
Whether the array is compactable .