Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

:: in php

/*
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.
*/
class MyClass {
    const CONST_VALUE = 'A constant value';
}

$classname = 'MyClass';
echo $classname::CONST_VALUE;

echo MyClass::CONST_VALUE;
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
3+9 =