Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105589 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11463 invoked from network); 4 May 2019 17:54:46 -0000 Received: from unknown (HELO mail-oi1-f178.google.com) (209.85.167.178) by pb1.pair.com with SMTP; 4 May 2019 17:54:46 -0000 Received: by mail-oi1-f178.google.com with SMTP id t70so6601073oif.5 for ; Sat, 04 May 2019 07:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=cnlgS3k7ZlzdNeLKqln5QH5kZX8jiST55UNu6VI/ueM=; b=B0VA/+UKvEMoqMziSaGuq2+oIVs3FjQh1lOUR2JTnin0elZpQ2wy6U8oixzlyBPNSR ceO8hUdmJFgVMZw9CA9GkUYt9vzwh4VaowuNyfrU7l5UlsfXkU8paP5czMXy3jDiH9c8 zp6GTqY/lcnU0CXcCKP6oQMxi4jhxQRuvRRvNZmQZWWMPiJw0oBte56ualFPhrMTNOba wX+GNHwPC0qV/NnrD4Id8HcoaSMkWHs3Ob/kiUTgqghmaMpQKltTFR2hhMHN5XElhbhW YEAQQNRkoEIp/Ot/cnMxPtP4vCmfdE2eWdE+qzXpzVYGqphcBxlI0al5b+uKCUb46rVE A8gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=cnlgS3k7ZlzdNeLKqln5QH5kZX8jiST55UNu6VI/ueM=; b=Nx44GPgS1kHtYVLtzBAKdpm/Z2s/IljztWrE1n1Tphfk/+gKZPcXmsdzEjG+ghmaRv aQU5Kv1VC1SszAKIWZGAujDqPBanI0GgPtdFn0xOx5FOTevf4/DHkKR0T3G44QOOtSlX 6tv6pX69BN8ygA1A4Duy3P6/a2pQevxTem019I1OTktTmuZ+dKS+nSyTHSSBnahbLwTL lR51yrNwV8yiqji5SxnQe5LL2rcJq0ub/rbt8hZZemiP6v+L+TmkaA1a33fE59kfd4AR v4XIWUJg5yzwBdPsPvvIvxNtiEvsyqPJ3MNqGrArp3fBJUyyJ9SAIr3eI1n0lo+IYI3L b44w== X-Gm-Message-State: APjAAAUjbzxdlrGpqORIMKwhSszBrE2ZT+5l4B0tuFJffbi9x7G+wZji lysG6QWicWbMjre6LR1kfkruXVwX X-Google-Smtp-Source: APXvYqyE1LSbOXo+0Da5C7EJEw0vExfMzUjvczSZeiXROU6C5DGAEV41rPyXonHD6G9DYn3cSdxT+g== X-Received: by 2002:aca:c649:: with SMTP id w70mr2389721oif.174.1556981876132; Sat, 04 May 2019 07:57:56 -0700 (PDT) Received: from [10.137.9.246] (35.3f.adb8.ip4.static.sl-reverse.com. [184.173.63.53]) by smtp.gmail.com with ESMTPSA id g84sm2193345oia.31.2019.05.04.07.57.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 07:57:55 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_B9D231E3-FB1B-42CC-94D5-202FE8AFF8C5" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Message-ID: Date: Sat, 4 May 2019 09:58:41 -0500 To: internals@lists.php.net X-Mailer: Apple Mail (2.3445.104.8) Subject: Proposal for a RFC From: stevenwadejr@gmail.com (Steven Wade) --Apple-Mail=_B9D231E3-FB1B-42CC-94D5-202FE8AFF8C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Internals team! I have an idea for a feature that I'd love to see in the language one = day and wanted to run the idea by you all.=20 The idea is to add a new magic method "__toArray()" that would allow a = developer to specifiy how a class is cast to an array. The idea is the = same mentality of __toString(), but, for arrays. I would personally love this feature and those I've run it by were also = excited by the idea. So I'm soliciting feedback in hopes that things go = well and I can officially write the RFC. As for implementation, Sara = Golemon is awesome and while chatting a few months back, knocked out a = proof-of-concept implementation = . = There's still work to be done if this proposal gets to the RFC phase, = but again, just gauging interest here. I appreciate any feedback you all can provide. Thanks, - Steven Wade= --Apple-Mail=_B9D231E3-FB1B-42CC-94D5-202FE8AFF8C5--