Blizz wrote: |
IMHO its not really good coding practice to name an member variable the same as a property. |
What is exactly bad on this? because I see only trouble with for example protected member with name $_test…
Blizz wrote: |
I would find it utterly confusing anyway... which of both you are using in the class itself? Logically the private member, but what if you wanted the other? |
There is no other property, they are the same, $test is private because I need to control what value can be write to this member from outside world, so magic __get and __set is used.
Blizz wrote: |
The parser handles the case correctly anyway: Actual code should always have precedence above comments. |
I think parser is wrong, because he just overwrite my property with private member, that's bug, because in PHP is possible to do this (private property can exists simultaneously with the same named public property, because of magic method __get).
edit: I tried Netbeans and Zend Studio. Their behaviour is as I expected, doesn't matter if there is private property or not…