Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115904 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57541 invoked from network); 31 Aug 2021 13:51:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Aug 2021 13:51:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 621AD1804E3 for ; Tue, 31 Aug 2021 07:26:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 31 Aug 2021 07:26:50 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id q21so32103198ljj.6 for ; Tue, 31 Aug 2021 07:26:49 -0700 (PDT) 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=pbj3KcMJ2MirebxozHw9c9OX9VSSUqxPxK8fRxUU9c0=; b=mc1piQYdd1Lunk0ZCo6kwNi3iWg+tfFcZrxcFD0xzjx2DdGaT7NyNl1DzorrqVMTsQ Tob0mCW9O8nBrBBILk+Xv8HYiUK+8cXfo2zTEqEQD4H/pALb9Omg4ooyaDRKwGPWno5h NZhbgQpte+Bi2h2atAtsEBoxiCl8cXWq93Jks2ft/KMvatSPfcp0kfv3Xw7Kw24RUQyb YF/qcXMgGE9hansHYvlhtIPVZRsb6VvwIZ33kEpmlOXMBKziy8jyPUD0sy713FAsxymR bwwjhiWWnyz5maoEXH9rQqq0nmfHsfks5FdueY7Dv/jCMk+yx8M10fJkboWeZ6WPW69J EyPg== 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=pbj3KcMJ2MirebxozHw9c9OX9VSSUqxPxK8fRxUU9c0=; b=hndi1XctYsW6ggmUJaig8pgqvTySR11NAG8sSK0i3B5VCzdXyJNdCUIkwPHxygGUQI gYKlQpRFmvfxDvkp0UfM6nUeuUqDu69TwYVvbVUhWlMZaJ6PWG+OdgBnsNTvo3X6ldwh Pm3EJnDJx/tzxJCYpnWaykp69HS8NVTYydZbM2DqLKuYPT8uloGEB6djDha9yTEqSsYn 2dAVNKqvfPktOkTS+O6HLqTRzfpsKu1L5pgVFI/eIVJa4e7blzyfdeSLsRBtkedn16nH HYXmkfJkb48dhWixKkCHE3Rg7/YcHDuX62/2Yv88GjrmLGmlEdRRyV5WukOKA5SE8cQE RULA== X-Gm-Message-State: AOAM531UqfSj+1C/Us04NvJVgzF/nzBnDhrryXtZAmSEa7SLRZtRFYi0 vw96MTTOQRFkmE2XwtF1qTU1YJhV7wmjOuxXZHM= X-Google-Smtp-Source: ABdhPJwoUiLle1zCfBZ+B2jDZo7BWj9LJX4szSc4juv1/Pclts9X5/qkidd40exVr+8YzDNWRDRGSDmDq+RCfm+c49Q= X-Received: by 2002:a2e:b5ce:: with SMTP id g14mr26152124ljn.93.1630420007369; Tue, 31 Aug 2021 07:26:47 -0700 (PDT) MIME-Version: 1.0 References: <20210831155642.1779f22f@mcmic-probook.opensides.be> <20210831161608.1e994d57@mcmic-probook.opensides.be> In-Reply-To: <20210831161608.1e994d57@mcmic-probook.opensides.be> Date: Tue, 31 Aug 2021 16:26:30 +0200 Message-ID: To: =?UTF-8?Q?C=C3=B4me_Chilliet?= Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000005fbf8e05cadbbd60" Subject: Re: [PHP-DEV] Resources and object resources From: nikita.ppv@gmail.com (Nikita Popov) --0000000000005fbf8e05cadbbd60 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 31, 2021 at 4:16 PM C=C3=B4me Chilliet < come.chilliet@fusiondirectory.org> wrote: > Le Tue, 31 Aug 2021 15:56:42 +0200, > C=C3=B4me Chilliet a =C3=A9crit : > > It seems to be consistent accross versions: https://3v4l.org/BHtAh > > > > But what will happen when LDAP connections are turned into objects in > 8.1? > > Will they also become int(0) upon serialization or will they behave in = an > > other way? I could not find a case of resource that became an object an= d > is > > allowed on 3v4l to test this. There is no LDAP or CURL in there. > > Quick followup on this, I found a case that can be tested on 3v4l: > https://3v4l.org/EKFP0 > > -> Fatal error: Uncaught Exception: Serialization of 'XMLParser' is not > allowed > in /in/EKFP0:13 > > So it seems objects of this kind throw when serialized (I hope they all d= o > that). Unless we made a mistake somewhere, yes, all "resource-like" objects are not serializable and will throw an attempted serialization or unserialization. > It is not clear to me how that behaves with session, will it throw as > soon as affected to $_SESSION, or at the end of the request? > Storing it in $_SESSION temporarily should work fine, it will only throw when the session is serialized. Regards, Nikita --0000000000005fbf8e05cadbbd60--