Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100482 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17979 invoked from network); 9 Sep 2017 07:00:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2017 07:00:23 -0000 Authentication-Results: pb1.pair.com header.from=i@lvht.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=i@lvht.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lvht.net from 183.60.52.105 cause and error) X-PHP-List-Original-Sender: i@lvht.net X-Host-Fingerprint: 183.60.52.105 SMTPBG252.QQ.COM Received: from [183.60.52.105] ([183.60.52.105:58564] helo=smtpbg252.qq.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/05-10715-48193B95 for ; Sat, 09 Sep 2017 03:00:21 -0400 X-QQ-mid: bizesmtp1t1504940389tj9lg24wp Received: from [192.168.1.3] (unknown [218.81.64.210]) by esmtp4.qq.com (ESMTP) with id ; Sat, 09 Sep 2017 14:59:48 +0800 (CST) X-QQ-SSF: 0030000000200020F440B00A0000000 X-QQ-FEAT: RckgDqrZPfDWjjzjuAMeqIocFueYNwpDQbLZVQ7Dx93gveAq3twQxgBeKlU29 Zhw9jcV1DgS3zjqbIa4ENiQiGbaSr3QtIwlMaeCp6TcEFhZbEpbLVtcmUPflohQkx33pf0i qgY9/R48L9AFTSh1kIJVorcF1pg9FQJvOcMiUqA91XSSB5Eaij2pDqoVfsMSYqtwJDh4riT O5l2JeGy+3h4xryxEAwnwpw+u05Y6Fi26XA4E59jzZ3WdLxrwDYVbomHfBntsQjw2XJbExX EstA== X-QQ-GoodBg: 0 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) In-Reply-To: <99.93.07025.9A2BD795@pb1.pair.com> Date: Sat, 9 Sep 2017 14:59:56 +0800 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <85C7AE75-18DE-4543-B4DC-BE1186AFAEC7@lvht.net> <99.93.07025.9A2BD795@pb1.pair.com> To: Andreas Treichel X-Mailer: Apple Mail (2.3273) X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:lvht.net:qybgweb:qybgweb10 Subject: Re: [PHP-DEV] Don't add simple objects to GC's roots From: i@lvht.net (Haitao Lv) > On 30 Jul 2017, at 18:19, Andreas Treichel wrote: >=20 > Hi, >=20 >> So I propose to make the gc_disable function accept one zval = reference as >> parameter. And if gc_disable get that zval, gc_disable just drop the = zval=E2=80=99s >> GC_COLLECTABLE flag, which will hint the PHP gc not to trace that = zval. >=20 > i dont know if this is a good idea or not. But for the "s" in solid, = create a new function like gc_exclude to exclude variables from the = garbage collector and do not add a parameter to gc_disable. A new function gc_hint($zval, bool $collectable) has been introduced at=20= https://github.com/php/php-src/pull/2665/files=