0

Why can't I access static property/method using object reference but only class?

I think it's can be done in python. I mean static access is for class but I want it to be accessible in class as well as it's objects. Is PHP purely OO language? Is it pure Functional? or it's a mix of OO, FP and procedural?

16th Apr 2022, 5:55 AM
lokesh
lokesh - avatar
1 Odpowiedź
0
Just use self::$static-var to access static member.
17th Apr 2022, 3:45 AM
Calviղ
Calviղ - avatar