Re: Add __toArray() method to objects that would be called on cast to array
| From: | Kalle Sommer Nielsen | Date: | Wed, 15 Mar 2017 22:27:36 +0000 |
| Subject: | Re: Add __toArray() method to objects that would be called on cast to array | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98548@lists.php.net to get a copy of this message | ||
Hi
2017-03-15 21:41 GMT+01:00 Marco Pivetta <ocramius@gmail.com>:
> This is a BC break due to the fact that the
(array) cast is
> used to
> extract property information from private properties in library code.
Yep, but then again that is more of an
undocumented-not-really-supported case afair, if anything then
Reflection should have the APIs to officially allow that, although I
am still skeptic of this.
--
regards,
Kalle Sommer Nielsen
kalle@php.net