I don't think you can have a "write only" attribute. If you can write, you can read, you just read the value of that property. If you don't define a "get" hook, you get the original. Defining the get hook just allows you to do some cool stuff behind the scenes like in the full name example. In that example, if you didn't have a get, you would just get back an empty string because last name is never truly set.
You missed three other major features: 1) Interface properties (Part of hooks, but useful on their own.) 2) Asymmetric visibility 3) Lazy objects Those are at least as cool as rounding modes. 🙂 (Which have also now become enums, I believe.)
@@Phparch tbh, I just need it for reflection. I want to build graphqly types based on the underlying php type. And an array is an array of anything. I know I could use doc comments for that, or maybe I'll use property annotation. My longterm goal is to not write PHP though.
I think Property Hooks is a mistake. It adds not so much, yet it allows to create completely unhinged mess, if used wrong. Don't like this trend of "lets put all the new stuff for the sake of new stuff". Language consistency >> new features.