Is it possible to define custom names for methods like
thing function foo() {
//
}
Where thing is the custom name?
I want to have my own keywords like “public”, “private”, “static”, and then get all things from a object, similar to how get_class_methods() gets methods.
No, PHP is not that extensible.
The closest thing you can do is use the __call method and implement some kind of restrictive behavior there. Be warned that this usually doesn’t result in the most readable code so it should be done with care and good reason.