Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95944 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20462 invoked from network); 12 Sep 2016 12:48:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2016 12:48:38 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.49 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.49 mail-it0-f49.google.com Received: from [209.85.214.49] ([209.85.214.49:35268] helo=mail-it0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/CA-58405-E14A6D75 for ; Mon, 12 Sep 2016 08:48:32 -0400 Received: by mail-it0-f49.google.com with SMTP id r192so6889020ita.0 for ; Mon, 12 Sep 2016 05:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9VsGQ+T7cOR88h1Hl3uEEh5tqLvZ1Qa6rmU7u+1fD08=; b=X00jyl4TJVceJYTgELLrAdcQqfuA8Lkmo6tz0Mu1u8qzX53Ie6KAH9AVJXGZIJp47Q V/uFiAN0+eP8hGh7h9Hfxm3DBTdkVnx6hkq+AX4iA/R68ROpN1VHfjOebPmWEh1TXE5I UVIIH/QhdsyLHZWbGE0NT2fNgiP1qIth37TtFn/0dZzPXfgdEc3jlzROqW7dDhYQhcly qsNuyKmIGY/mNnDZTEFkn+fz0mYqXKIk3uRkwpZQrtBLQdoqSg5GpuUD3UJZBYg0bpG9 9UDXGTNgsYoGFziDZsnf7giQZaNaLBMTG1OGv1mBKhNqU0ZaPldFgPKRRXVWw4HhwEtZ xMag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9VsGQ+T7cOR88h1Hl3uEEh5tqLvZ1Qa6rmU7u+1fD08=; b=N7oRBLlAoz/n8DLfsdONMdK0arKIu8UM/1DkZ46b2mLsVoR8yqCcqoySEuoHQNExDr LV+WXVyes7nO/jZJm9t/qt+WXdtzwU7VBH/iSf+sIAWKtL0EmGJdOaqI+BiytUjEZNqU CXn/hfM3fJXM/P+AwKF4X6Dw+fi2MKo3vz7a03gUlE9/jp9yjWzQP0JoGw0791ulmvAD uydnZl0hHugEFfDpEG9BgTAS31EbAzl1jzVMOG12LdgaCTMYhEejTT/wn9WPj1lVoT38 qIX804hwFcrTfmHDTNkEBqAQGCbCZYz+VdMo00TwcJNbEBXC7HFpQAPWDEiujTa3SK70 Fn0A== X-Gm-Message-State: AE9vXwNPXPPNAZu/y8hFyWuwSzutR38VI8s5tWZMdJQWOX9mGc0DzkGFWJVag3No1Vm2QgS+yLkl+sJWLhJhuA== X-Received: by 10.157.37.202 with SMTP id q68mr20525910ota.112.1473684507124; Mon, 12 Sep 2016 05:48:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.51.85 with HTTP; Mon, 12 Sep 2016 05:48:25 -0700 (PDT) Received: by 10.202.51.85 with HTTP; Mon, 12 Sep 2016 05:48:25 -0700 (PDT) In-Reply-To: References: <878tuxenl4.fsf@lil.giraffy.jp> <87twdlcs2j.fsf@lil.giraffy.jp> Date: Mon, 12 Sep 2016 19:48:25 +0700 Message-ID: To: Kazuo Oishi Cc: PHP internals , Yasuo Ohgaki Content-Type: multipart/alternative; boundary=001a113acde08eec76053c4ee97e Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Improve uniqid() uniqueness From: pierre.php@gmail.com (Pierre Joye) --001a113acde08eec76053c4ee97e Content-Type: text/plain; charset=UTF-8 Hi, On Sep 12, 2016 5:48 PM, "Kazuo Oishi" wrote: > > Hi, > > > I know some code breaks, but it's not many. It's not fatal BC also. > > > > IMHO, uniqid() should try to generate uniqid() possible. uniqid() does produce > > non unique ID because it is system time based. This change mitigates impact of > > misuse also which is common in both open and close codes. > > > > Which is important? > > - Fix known issues and generate unique ID (as much as possible) > > - Let it generate non unique ID and ignore for some code may complain. > > IMO, improving it (generate better semi-unique ID) is not important > enoungh to introduce unnecessary BC break. (Why returning string length > is changed?) I fully agree. > If good unique ID generator is needed in core, please create new > function with another name like "unique_id". I would prefer to document the limitations and point to uuid or the Peng instead of trying to fix something that was not designed to achieve that (or was but at a time where the results were acceptable). > -- > Kazuo Oishi > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --001a113acde08eec76053c4ee97e--