PHP 的 class，屬性和方法名稱可以相同。
至於使用時，是存取屬性或調用方法，則視寫法區別，例如 $obj->bar 或 $obj->bar()
Class properties and methods live in separate "namespaces", so it is possible to have a property and a method with the same name. Reffering to both a property and a method has the same notation, and whether a property will be accessed or a method will be called, solely depends on the context, i.e. whether the usage is a variable access or a function call.
php - member variable and member function have the same name - Stack Overflow
PHP: The Basics - Manual (Classes and Objects)