PHP - Classes and Objects
Which of the following is the correct syntax to access a class constant named
VERSION in PHP?VERSION in PHP?:: with the class name, like ClassName::CONSTANT.$obj->VERSION tries to access a property, not a constant; ClassName->VERSION is invalid syntax; $obj:VERSION uses single colon which is invalid syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions