private static function stringifyArrayKey(array $key): string
    {
        ksort($key);

        foreach ($key as &$value) {
            if (is_array($value)) {
                $value = self::stringifyArrayKey($value);
            } elseif (is_object($value)) {
                $value = self::stringifyKey($value);
            }
        }

        return json_encode($key);
    }
private static function stringifyArrayKey(array $key): string
    {
        ksort($key);

        foreach ($key as &$value) {
            if (is_array($value)) {
                $value = self::stringifyArrayKey($value);
            } elseif (is_object($value)) {
                $value = self::stringifyKey($value);
            }
        }

        return json_encode($key);
    }
private static function stringifyArrayKey ( array $ key ) : string { ksort ( $ key ) ; foreach ( $ key as & $ value ) { if ( is_array ( $ value ) ) { $ value = self :: stringifyArrayKey ( $ value ) ; } elseif ( is_object ( $ value ) ) { $ value = self :: stringifyKey ( $ value ) ; } } return json_encode ( $ key ) ; }
Calculates string representing specified array key

@param array $key
@return string
Calculates string representing specified array key