Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108376 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93685 invoked from network); 4 Feb 2020 15:23:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Feb 2020 15:23:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D4E11180210 for ; Tue, 4 Feb 2020 05:36:04 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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, 4 Feb 2020 05:36:04 -0800 (PST) Received: by mail-wm1-f50.google.com with SMTP id c84so3679543wme.4 for ; Tue, 04 Feb 2020 05:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a9YFucctkV9SlGgscijqxuRfTvGj0qFhaCjrMg01tFA=; b=yi6fp03LjakBsZocwxx9/uq7ChMSgrny4IB6SlacwYtIIpZEppyDzfHlZVCobnbsfK FWWvE1oKibCc8SABqVyhUlDa42jIqSaAuPCOH6ebEDxVmQe1Qs+rlu8nxEqV6L2ohVUR TtBszih6HSdF5kPRk9xU0NuJXFVgIbiV+V8fI5VjQ/ayBUn93Qey48g7mryC9XAs+8zL +bPtvnTt5ZnkLCJwPvLKw3Wx8jiGsUzSu5yS5D2t84OVY/ZkruOqBfZDhF4g+ioA4y5H 2jwxc17O3VGdBw+aNec5VLHdh/UWjdtkW/PfFozePhQiVKan/6BQnmy1N4eGoJsLFpCF O25Q== 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=a9YFucctkV9SlGgscijqxuRfTvGj0qFhaCjrMg01tFA=; b=BCLPMiRGdN5PxXCv1kLcXgupY1xqCfupYhJQzY88u7R06Rl4GJSlNMigKvMrDrtWrO tEE2UWoCcvH+wOdymmcx4+D8LmvTz92FnqF8nkBe1q27yQeV28geL/MtbILV7ZkhvtPZ FMTYPUHAV4QqUnAFYqkSvCONQ7tZGXB6fUd8t9B7cZ7QOTfmzdUAIF2hoofEAdBUOf3f JTIJq6ToK7iWf5HokeClrMn2Af98+UqOTAdYlpd9gtkLzke7M7+o+SEIXFh3PeSwnAH6 7BcEYLzNqlfbr8HPt+MXPLXwFHEkkaOMD9noSm/qDWrqXRhcJiC1nk03PJ1AIwVxtWZ0 x9Tw== X-Gm-Message-State: APjAAAVWnuTEAFXHuNmlZaEnkb1XZ4sIwavgVMRaFsqPkBLeGi73Cz2X O6GTIYZzHAt+XuVqsrNyQ3rvWgcP16s8YfC21kPTjA== X-Google-Smtp-Source: APXvYqwZ94c9Pzh9jJXRLQ6RDp1et6kDQb77yV6+uAe5ix2vKwoHd7gLI5j9K8cOtsp7sptjIxPFNJCgA3fgqPspAP4= X-Received: by 2002:a1c:67c3:: with SMTP id b186mr5789702wmc.36.1580823363406; Tue, 04 Feb 2020 05:36:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 4 Feb 2020 14:35:52 +0100 Message-ID: To: Marco Pivetta Cc: Steven Wade , PHP Internals Content-Type: multipart/alternative; boundary="000000000000076095059dc01ff5" Subject: Re: [PHP-DEV] [RFC - discussion] __toArray() From: kontakt@beberlei.de (Benjamin Eberlei) --000000000000076095059dc01ff5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 4, 2020 at 2:10 PM Marco Pivetta wrote: > Linking (again) previous discussions: > https://externals.io/message/98539#98539 > > `__toArray` as a magic function call when `(array)` cast happen is a bad > idea: it is a BC break, and it removes one of the very few interactions > (with objects) that didn't cause any side-effects ( > https://externals.io/message/98539#98545, > https://externals.io/message/98539#98567) > I think we can't classify it as BC break, because no existing code implements __toArray at the moment, and hence it will not fail when this feature is introduced and code gets upgraded to newer versions. Its correct that this removes the last simple way to get access to all properties on an object, although we can potentially remedy this with a function (which makes a lot of sense). > > Greets, > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ > > > On Tue, Feb 4, 2020 at 2:03 PM Steven Wade wrote= : > > > Hi all, > > > > I=E2=80=99d like to officially open my __toArray() RFC < > > https://wiki.php.net/rfc/to-array> up to discussion. I=E2=80=99ve delay= ed > > changing the status until I had more time to respond to the discussion, > but > > since it=E2=80=99s been brought up again , > I > > figured now is the best time. > > > > https://wiki.php.net/rfc/to-array > > > > Cheers, > > > > Steven Wade > --000000000000076095059dc01ff5--