Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109066 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78849 invoked from network); 16 Mar 2020 17:44:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Mar 2020 17:44:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 15A4418054D for ; Mon, 16 Mar 2020 09:07:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 16 Mar 2020 09:07:06 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id f10so19299767ljn.6 for ; Mon, 16 Mar 2020 09:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7OWtmw/5Uonk/BK6jqqqU1I/V7raXKvzIHyHQTFXxes=; b=QaAKNQmCu2Mrv74Z+PI0zZdHZyw7aFXbEK7oyk6e9RifOXGTJJmwq6jxm/TMhGZ+1L ad6DaIAeAmc5B6z1AEQUhrhDYz1SDX5tBIw/VoypTvBYXhBFxDkN4XK5KqTC1qwx32HW r7HVaq7OfynlOB498eYMb7vcAqntsc1DRyaZbnkw98iFZxoBX36xb8DtOIbANjPoisbO G44sf2wnMNjMhTgd6aclHsdugRo/mcCmz37nVGB/N7QTU3gnwglwuUgLKzlvpfXu/e9g XpvbQbZThims5g32fjpmO7fOcr2uB25jfHKTdhvJYzMu0nbJPrZo7ujKYW85CLsxOpbK d6gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7OWtmw/5Uonk/BK6jqqqU1I/V7raXKvzIHyHQTFXxes=; b=El5RBEl4m+53lfjmAzYfd1JTckI5mg+2e7X25rGbd/DVRKN85UQ/oqSkVnFZtOktXu aLX6g52twvlCq76iopunGtFwhVtdXMuFDld7PjaikcdC7aYZ6iwDhQf6kZ6OFlhs6i4B Pwgp1y5uTqTj9EqaGMKLz5wMV9aKJVAujyx4MwTdBBuywHEZCHmHxhppqaifkNJxvTyS s+exlbKPkwgsFnHKzJvA6/ObGzEuysd3Mf9YtpbWTn+yzh5MF2cBpf3stINHu5B93Zdk xRsAp+zinpb/Zc4X08oa4uekb1j5Ed5LlP6cQYHBFyCIwQTpW/qwZRm6QjvD97w74L+F iskg== X-Gm-Message-State: ANhLgQ0s5YuBuXiRs/mAzEUh7bqG2sW6+ilsIaWsvzPMAuKsSqVjolqf PU1FdHze3vsPImmkqMGgBm8qiMum2ERUFMW5NUhO/++F X-Google-Smtp-Source: ADFU+vveTDhFWzRPQI7Y60gWB0Lu99DNWNgg2c3zpsIwwbLegoAea7fJsv+mJmWTvXKo7OUWKK52JId+IpC4ohRjSZU= X-Received: by 2002:a2e:b4f4:: with SMTP id s20mr9246ljm.131.1584374822974; Mon, 16 Mar 2020 09:07:02 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 16 Mar 2020 16:06:25 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000083b87205a0fb029a" Subject: [DISCUSSION] Native UUID support in PHP From: cdtreeks@gmail.com (Aran Reeks) --00000000000083b87205a0fb029a Content-Type: text/plain; charset="UTF-8" Hi Internals, I'd like to open up a discussion around the implementation of a new function within PHP for generating a UUID. Whilst there are libraries out there already for PHP which can generate a UUID, all of those libraries have the possibility to generate IDs that *could* have a collision. The specification for UUID versions 1 and 2 allow for collision-free ID generation by incorporating the unique MAC addresses from network cards - something which can't be accessed from PHP code at present. I can see two possible methods to enable this; - New function added to PHP which exposes the MAC address (allowing external implementations for UUIDs, as well as other possible purposes a MAC address could be used). - A new PHP function which introduced a uuid() function which will generate and return version-compliant UUIDs. - Both of the above. Thoughts and feedback welcome to kickstart conversations and if there's a positive consensus, I'd like to put forward an RFC for this to be introduced in PHP 8. Best, Aran --00000000000083b87205a0fb029a--