Hi guys,

Just wanna ask what the "::" is for? ex.


Correct me if I'm wrong, the CRM_ContactsCommon is a class and the get_my_record is a function inside the class. Now, is the "::" works the same way like in java to access a function of a class?

Thank you in advance.

In PHP :: is used to denote a static class i.e. one that does not need the class to be instantiated first.
If the method is not static you need to instatiate the class and then access the method via $class->someMethod().

Thank you hericles for the brief description :)
Thank you pixelsoul for the link, I really dont know what to call the colon-colon ( :: ).

Just checked the link, and....yes you're right,...
From now on I'll that too as double colon.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.