PHP Interview questions


Total available count: 33
Subject - PHP Frameworks
Subsubject - PHP

What is scope resolution operator(::) in PHP?

The Scope Resolution Operator is also called Paamayim Nekudotayim or in other words the double colon, is a token that allows access to static, constant, and overridden properties or methods of a class.

Example:  

<?php
class Slightbook{
    const CONST_VALUE = 'A constant value';
}

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

echo Slightbook::CONST_VALUE;
?>

 




Next 5 interview question(s)

1
What is overriding in PHP?
2
What is overloading in PHP?
3
Does PHP support multiple inheritance?
4
Explain about various visibility in PHP?
5
What are Autoloading classes?