public static function insertBefore(array &$arr, $key, array $inserted): void
    {
        $offset = (int) self::searchKey($arr, $key);
        $arr = \array_slice($arr, 0, $offset, true) + $inserted + \array_slice($arr, $offset, null, true);
    }