> I’m not against the proposal. I’m mainly asking if there are other ways in > the language today to accomplish similar things. I would prefer to see > interfaces used over more magic methods (something like ArraySerializable).
A Twitter user pointed out that 7.4 is adding two new magic methods <https://wiki.php.net/rfc/custom_object_serialization> - __serialize() and __unserialize(). So adding more magic methods to PHP isn't unprecedented. On the same note, casting is already magical, so controling the implementation via a magic method is more in line with current functionality. -- Steven Wade stevenwad...@gmail.com