Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104018 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90062 invoked from network); 2 Feb 2019 12:57:37 -0000 Received: from unknown (HELO mail-yb1-f171.google.com) (209.85.219.171) by pb1.pair.com with SMTP; 2 Feb 2019 12:57:37 -0000 Received: by mail-yb1-f171.google.com with SMTP id t11so3693081ybi.12 for ; Sat, 02 Feb 2019 01:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xxT7MvRSRZxsuB8hA1l1Emyk7tY5Y8P7GXTfjtEa9dc=; b=dReKCj3OggqMWC4gINBWQ13yRhexkIyT9JNF61yCz4HtUZz4HgJdyAbkwf3tjsfyAK 5X1eKmO6a6r4l9MZUQQ8TPO9BE10iHrTWgmGlwRsMj01ASOdvAazk+8op1PyoQk7mB5v oN6INiAh1re1rH9jNWmIVEASkbkkxo4AHBnuLT05xgte/TfD/n+JAQDqBVTHccAddcDU pZqhUl5PNvTzz0Uk02EzbV4Gd0DZ9ZAuj5aODftfoytVXjrmdVs5cwbnVzbSG3x5/YgB gs9HDFmu6U5j4FTL1yQlt9WwyAMP6Fsr9NRiIafDvVWEC9GYF0PwBVhX8uI652L1ZITY 61aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xxT7MvRSRZxsuB8hA1l1Emyk7tY5Y8P7GXTfjtEa9dc=; b=npQbFfWx2q6H2Opy3laZ8pC4SmQGjiSXR0od7Vaa98h9p5VcGlCQ+JgSghj4Y2e2a3 9dkp9DJCWjH3bSD3CaTzKwo+nGT/b1hX0Z732QkyDlmbOkm3DFf0h+8P0ms+mItE81oy lEQ6XnZyy/Ww0r1T5qt48L2R6clmKNftGoIZfbACoZO3VwA7gCe+surYil9StWqEhM0F nnUG7wdkRRom+Ezz7fdcf9LjOJ+pV+3i8mCc2csfG/YUgJdvwQsp74lacxyFtUhLDb89 N77Stso8ADrm64cJKx1G4vryAEqWEn4OZeB8c/Bh7e4USfQCYRnLG8AFhq3RZ9wBP8yZ vqSg== X-Gm-Message-State: AHQUAubac/nG9+C+9jtStAW9NLTGa05qLkcNEULe+5NV/ZfwF/0B0YFF zdeuU6UNeN4TBASfAKMQUyjaxmhUq0CT3sH24O7RDiS2 X-Google-Smtp-Source: AHgI3Ib+ZWwv35hmkj60Ov/EdjQ+f4NW151GCaIl8a7u0HoHO3EOqfCFresjzhEhSfoGza62cEHlg7+hY5eeOiqMTBs= X-Received: by 2002:a25:a361:: with SMTP id d88mr22194554ybi.317.1549100277909; Sat, 02 Feb 2019 01:37:57 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 2 Feb 2019 10:37:46 +0100 Message-ID: To: Joe Watkins Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000c94e590580e60372" Subject: Re: [PHP-DEV] RFC Weakrefs From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000c94e590580e60372 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was precisely hoping there was a WeakRef implementation the other day. This would be very useful for a simple data mapper, where you could keep references to loaded objects and a cache of their original properties, to compute the changeset to sync to the DB when save()ing them. WeakRefs would allow to automatically clean up the cache of loaded properties when the object goes out of scope and is reclaimed by the GC. So, FWIW, big +1 from me, and thank you for the RFC and the PR! =F0=9F=91= =8D Ben On Sat, 2 Feb 2019 at 09:35, Joe Watkins wrote: > Morning internals, > > Some time ago I brought this up for discussion, and last night was remind= ed > of it's existence, and so this morning rebased and reworked the patch a > little based on the feedback I got back then. > > Since it was long ago, and there's no particular rush, I don't intend to > open voting until the current policy adjustment RFC's are resolved, but > wanted to give everyone a heads up and ask for any feedback you may have = at > this time. > > https://wiki.php.net/rfc/weakrefs > > Cheers > Joe > --000000000000c94e590580e60372--