Re: Add __toArray() method to objects that would be called on cast to array

From: Date: Thu, 16 Mar 2017 06:27:59 +0000
Subject: Re: Add __toArray() method to objects that would be called on cast to array
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-98564@lists.php.net to get a copy of this message
FWIW I do prefer having a specific interface to do such conversions. I was just trying to find a way to have list-like or Traversable objects ability to be converted to plain array. This brings more problems than actually solving. I will just stop thinking about this and can give this thread as reference of why this feature would be a bad idea.

« previous php.internals (#98564) next »