Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87491 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71515 invoked from network); 2 Aug 2015 06:52:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2015 06:52:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.176 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.176 mail-pd0-f176.google.com Received: from [209.85.192.176] ([209.85.192.176:34258] helo=mail-pd0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/00-05719-F2EBDB55 for ; Sun, 02 Aug 2015 02:52:32 -0400 Received: by pdbbo16 with SMTP id bo16so3387862pdb.1 for ; Sat, 01 Aug 2015 23:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=a4Jn1TqIIYB6bOUOwtibOfn8OPIGyG7QImlOn3vwSTA=; b=bKUZP2ZXlScDhLRywjnAAM8BQcLMAVUjSFfPKSs+XDWdD+wsugVXv6tuvGYAaqxiin Fjj6ybcbHawzyjTApEXljxDITHUHvR6m+aR4F0zPdg+dW0jv5KsHR00B4sSoV1H1snsf HQXdBVBtDFR0LLrK6odhsTzddKRIEPfrtcVteNVr75aArG6sd5oxUge5qbEhx+ElQYH3 /i7gBbcMzr+Ifi75KHRy6dmjK2dPMDAiPnocOYuMJ9/u44uUWcjj1+6nc8EFgMlVKnj8 SuN/GDPp/JtKE+cSDHK3B7b4Z1eKRbQj31put8Rd9fU2ZC1E33yHZguJk6cuRrLPDq5J c8ZA== X-Received: by 10.70.94.98 with SMTP id db2mr24664489pdb.130.1438498348328; Sat, 01 Aug 2015 23:52:28 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by smtp.gmail.com with ESMTPSA id kk1sm3887630pbd.60.2015.08.01.23.52.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2015 23:52:27 -0700 (PDT) To: Anatol Belski , 'Nicolas Grekas' , 'Julien Pauli' References: <024101d0cbaa$f864aa50$e92dfef0$@belski.net> Cc: 'PHP Internals' , 'Sebastian Bergmann' , "\"'Ivan Enderlin\"@Hoa'" , contact@jubianchi.fr X-Enigmail-Draft-Status: N1110 Message-ID: <55BDBE25.5050104@gmail.com> Date: Sat, 1 Aug 2015 23:52:21 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <024101d0cbaa$f864aa50$e92dfef0$@belski.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Exposing object handles to userland From: smalyshev@gmail.com (Stanislav Malyshev) Hi! Some suspicious use of spl_object_hash() out there... > https://github.com/symfony/symfony/blob/master/src/Symfony/Component/VarDumper/Cloner/VarCloner.php Not sure what this one does... but calculations with spl_object_hash() look very suspicious. > > https://github.com/horde/horde/blob/master/imp/lib/Factory/MimeViewer.php > This one _might_ be doing it right, but not sure as basing caching instances on hash of a (mutable) object may produce weird results. > https://github.com/horde/horde/blob/master/framework/Support/lib/Horde/Support/Randomid.php Oh wow, what's going on there? That's obviously not a proper use of spl_object_hash(). > > https://github.com/WordPress/WordPress/blob/master/wp-includes/plugin.php I guess this one is wrong too, as it mentions storage, and storing object ID is pointless. Maybe I am misunderstanding what "storage" means there. -- Stas Malyshev smalyshev@gmail.com