Hello internals, I last brought this RFC up for discussion in August, and there was certainly interesting discussion. Since then there have been many improvements, and I'd like to re-open discussion on this RFC. I mentioned in the first email to the list that I was planning on taking a while before approaching a vote, however the RFC is much closer to vote-ready now, and I'd like to open discussion with that in mind.
RFC Link: https://wiki.php.net/rfc/user_defined_operator_overloads There is a patch for this RFC, however the latest commits are not playable. It will build, but with various problems which are being worked on related to enums. The last playable commit can be found by checking out this commit: https://github.com/JordanRL/php-src/commit/e044f53830a9ded19f7c16a9542521601ac3f331 This commit however does not have the enum for operator position described in the RFC. It uses a bool instead with true being the left side, and false being the right side. Implementation details still left: - There are issues related to opcache/JIT still, so if you want to play around with the playable commit disable both. - Reflection has not been updated, but the proposed updates necessary are described in the RFC. It is a long RFC, but operator overloads are a complicated topic if done correctly. Please review the FAQ section before asking a question, as it covers many of the main objections or inquiries to the feature. I'd be happy to expand on any of the answers there if prompted however. Jordan