class via :: in php

It is for static page, dynamic page, website, SEO, performance and other web development discussion
Joshi jahanvi

class via :: in php

Postby Joshi jahanvi » Fri Oct 31, 2014 2:37 pm

What does accessing a class via :: means?

sonall gajera

Re: class via :: in php

Postby sonall gajera » Wed Jul 08, 2015 8:49 am

The Scope Resolution Operator (also called Paamayim Nekudotayim) or in simpler terms, the double colon, is a token that allows access to static, constant, and overridden properties or methods of a class.
When referencing these items from outside the class definition, use the name of the class.As of PHP 5.3.0, it's possible to reference the class using a variable. The variable's value can not be a keyword (e.g. self, parent and static).

Return to “PHP, HTML, MYSQL and Web Hosting”

Who is online

Users browsing this forum: No registered users and 8 guests