Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99787 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30922 invoked from network); 6 Jul 2017 06:46:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2017 06:46:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=michal.brzuchalski@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=michal.brzuchalski@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.178 as permitted sender) X-PHP-List-Original-Sender: michal.brzuchalski@gmail.com X-Host-Fingerprint: 209.85.128.178 mail-wr0-f178.google.com Received: from [209.85.128.178] ([209.85.128.178:36545] helo=mail-wr0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/17-15131-0CCDD595 for ; Thu, 06 Jul 2017 02:46:24 -0400 Received: by mail-wr0-f178.google.com with SMTP id c11so14753987wrc.3 for ; Wed, 05 Jul 2017 23:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dS+XW3d/QNjjEBImL6r3sUbqFUAk/j/vU75M24MP20I=; b=GX73CQG/ygaaZ5x2LcQ8p1et1mRBt1dle9Pmj/1JSXHv8S+mIqcPiZO8SGioHl+2MQ TOesYnyVviZK3Fi437s1RlxyMadPtAOi0BbiPPjDTDOTuuNA5w/fs/NbcTqFvTz7/91R bmFtnCUekyGXMJgQg414iIDL1pVBOaXpTLKWaqcKY8lzAlFwIfZUGKurcBR3rGhMg2ty i79qIBBCCLR+n+j7MVR/juoAy1RNbgHxYlhhuuzqU+TZW+g56wcPiQSYDb38rzyAvPrN T1GH5jnLu8qlu2SYW9Q/BxNIqQ2kMFnawVoxkr+eEi1ycO3GLpijMRFn2gqicMsa9ydy 7Qsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dS+XW3d/QNjjEBImL6r3sUbqFUAk/j/vU75M24MP20I=; b=Hd88rWtrm4DwR1aIhwq1N2t6EUaaZ29NiBAB5s0ldW2dZvPR3c1mf35gl5ui6KOIgE VIuPOYqpHfvBoUcnbggjxphSQyERI3VNFm37K6fnEsqsUsu9V7c0hMG4KhJcmYrAi+59 tQRmRB7omyExSvWIaJhGN0rcli7LP4bqNJJoYXFLO7Ots12XzNGWWA7uYrBa/GRT5wBN B3RzP+3Ki94jStJRihsZKVaRVSW8EYtiouDJIAj9rpaj66MiJwOaoDcv5moJiHNLHE+C XWYvNPqPhltKZds3iUtS/Su9k80WFZER0BPisvpG9MUsibF0xAD2eNPqA6W688gZjiK/ 1qCw== X-Gm-Message-State: AKS2vOxC24wtbQLX4B6KhmZntJxRZaq+bLvv1ovXvHMpctApDTWXDqdV kwBynItm4FHwvZsiC/hW+Nh5gEOAaA== X-Received: by 10.223.176.253 with SMTP id j58mr38925027wra.65.1499323581580; Wed, 05 Jul 2017 23:46:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.134.13 with HTTP; Wed, 5 Jul 2017 23:46:20 -0700 (PDT) Received: by 10.223.134.13 with HTTP; Wed, 5 Jul 2017 23:46:20 -0700 (PDT) In-Reply-To: References: Date: Thu, 6 Jul 2017 08:46:20 +0200 Message-ID: To: tyson andre Cc: Nikita Popov , PHP Internals List , Stanislav Malyshev Content-Type: multipart/alternative; boundary="001a11c0204c7bcccc0553a079c0" Subject: Re: [PHP-DEV] Exposing object handles to userland From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --001a11c0204c7bcccc0553a079c0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 06.07.2017 07:24 "tyson andre" napisa=C5=82(a): > > Updated https://github.com/TysonAndre/php-src/pull/1 , which is now much shorter. > > In response to Nikita Popov's comments: > > > I'm +1 on the addition and would be fine with including it without RFC, if > > there are no objections on internals. > > How long should I wait to see if there are objections before creating a pull request? AFAIK you can create PR any time. > > > > - Can two objects can have the same object id > > > but different object handlers? > > No: In PHP 7 this is not possible, which is also why spl_object_hash() no > > longer includes the handlers. > > True. Checking again, the implementation of spl_object_hash > doesn't include the handlers, so I don't need to worry. > > > You can drop the masking. It was never effective at what it's supposed to > > do (hide memory addresses), but as this is the object ID only, it is > > completely unnecessary here. > > [...] > > Only in the sense that it could theoretically wrap around to negative > > numbers. Of course those would still serve as IDs just as well. > > That makes sense. I'm omitting the XOR > (and returning the unobfuscated object handle/id) > in the proposed change, then. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --001a11c0204c7bcccc0553a079c0--