I'm just wondering if this is even possible. None of my colleagues knew, and I couldn't find anything from a (admittedly kinda quick) Google search.
Basically, I'm wondering if there is anyway to detect if a variable is static or not, and if a variable is public, protected or private, from within their class.
The reason I'd like to know is so I can be safe with overwriting the __set() method with a call like $this->$key = $val as the default: in a switch statement, and not give external scripts the ability to alter private and protected variables.