Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104194 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99370 invoked from network); 5 Feb 2019 19:42:32 -0000 Received: from unknown (HELO mail-vs1-f51.google.com) (209.85.217.51) by pb1.pair.com with SMTP; 5 Feb 2019 19:42:32 -0000 Received: by mail-vs1-f51.google.com with SMTP id x1so2493279vsc.10 for ; Tue, 05 Feb 2019 08:23:42 -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=LSgW16E672aPImZhE4Sjl8eQTTRCMy6/Mr7glfDpw1A=; b=tuvqNnCfcrfoJiX349ZH8AuAL3lsRUode6eXh+GfdEoz3Y1pstHVwW7UAoSDZ3oGPh yej2dY/MLtFwbzgdoMs7uOvBf4DMZf2DQD7UJjvInaHUsaQBPohMLeB/Jz7G8T2ieWQw 8b52go2wBolG/55vAorGOjZUso/6LgEHiexP6+K0ME1n8po2qp6QikYkZZdqWOgUCKop WduW9vmNdwYzq/r7+86jLdFpMMJDfvuDaIgyzJ0NbvxwwZmuFcnBMdBC5sm910pSzT3R vfFx0sNxEGJja6e6YXnTR/wqrp2+eZXnUjQnMD2h68dXQJAaBDGG6HhvX/5xT2qC/mRi byQw== 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=LSgW16E672aPImZhE4Sjl8eQTTRCMy6/Mr7glfDpw1A=; b=hOq+aSpLnhrIKkbmzoNCGkWhH70swBXtX5T2TmUUg0CVmFPPaD3kUuF5fj+zR01Xxq ajSYDXLlNfp2NgefAzxg9BXDlZA5LseXHPct3KfG5DhsUVY15OsqBk3SkbHIfYdDMmhn jaU5M+ELDJQei7qUZ3LvJ+c3JyePnTZzgSQPclqHJCQ+YALg5oaNqeEkJEUgX4P5s0P8 4RyG9jExT+PnxC5GVUsgE25rGc+5tycKMZDant7hVmPAAHNBk0o6OevL64y4+OupB2le Ttty98dohwU6zKx3GpqUWrcfAEoRz7OtY1UHyC8BvDpRZphSrwBoaEtU0Hyxh2LVnONV X0+g== X-Gm-Message-State: AHQUAubSwSZ9GRKL2if92URBxtKFQ573dG5/PABp4q0ORsIQ1D5EkuT2 jv60bDLbUmj7TRfelqF1rX7CGCh9Wx4GXeiT8JA= X-Google-Smtp-Source: AHgI3IYuucZ0C8CaqykreFTOTDR4hGGwupx5zucsgkKaUGsKxbIED67u7DeTAWu6PmlLLe7sRbJxZJ8X9b3eaYJHFCE= X-Received: by 2002:a67:1b04:: with SMTP id b4mr2365818vsb.141.1549383821866; Tue, 05 Feb 2019 08:23:41 -0800 (PST) MIME-Version: 1.0 References: <2fed98af-3831-1a1c-def8-04793fcc0c6f@birkholz.biz> <2a566239-d205-72f8-fd78-630b7ff01581@birkholz.biz> In-Reply-To: <2a566239-d205-72f8-fd78-630b7ff01581@birkholz.biz> Date: Tue, 5 Feb 2019 17:23:27 +0100 Message-ID: To: Dennis Birkholz Cc: Nikita Popov , Joe Watkins , PHP internals Content-Type: multipart/alternative; boundary="00000000000052bc8505812808c7" Subject: Re: [PHP-DEV] RFC Weakrefs From: george.banyard@gmail.com (Girgias) --00000000000052bc8505812808c7 Content-Type: text/plain; charset="UTF-8" On Tue, 5 Feb 2019 at 17:06, Dennis Birkholz wrote: > So I would really prefer the WeakReference class would just be > serializable with all the consequences you outlined. Maybe for PHP 8 we > will decide to require all classes to be serializable except classes > that implement the Unserializable interface or something... Or the magic > __isSerializable() method that can decide this at runtime for the actual > state of an object without failing hard when trying it. > > Greets > Dennis > That on its own would need an RFC AFAIK and I'm not really a fan of this hypothetical change. Also it feels kind of backwards imho. Why should I specify that something is NOT serializable when serialisation is a behaviour that usually needs special care with? Also what would happen when someone does the typical thing to prevent serialization: public function __sleep() { throw new Exception(); } Best regards George P. Banyard --00000000000052bc8505812808c7--