Re: [PHP-DEV] Proposal for a RFC

This is only part of a thread. view whole thread
  105590
May 4, 2019 15:59 pmjones88@gmail.com (Paul Jones)
Hi Steven,

> 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'd like to see this as well. -- Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php