Vidyalelo
PHP · all questions

Basic PHP
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

54

Questions

3/3

Page

Pick an option on a question to see the right answer and solution.

PHP does not support numbers written in hexadecimal, octal or scientific notation.

Select an option to see the answer and solution.

PHP ..... demand that you declare a data type when you create a variable.

Select an option to see the answer and solution.

strval()

Select an option to see the answer and solution.

What is the limit of a PHP integer value?

Select an option to see the answer and solution.

PHP considers the following values as False

Select an option to see the answer and solution.

With the introduction of namespaces, the same function name can be used in multiple places.

Select an option to see the answer and solution.

Within a namespace, for accessing the built-in PHP classes you can prefix the class name with a . . . . . and let PHP look in the global class list.

Select an option to see the answer and solution.

Which of the below namespace declaration is correct?

Select an option to see the answer and solution.

Multiple namespaces cannot be defined in the same file.

Select an option to see the answer and solution.

As the namespace size grows, using namespaces can become a little repetitious, but PHP also provides the . . . . . statement, which allows you to alias a specific namespace.

Select an option to see the answer and solution.

Some PHP code might not have a namespace and therefore lives in the . . . . . . namespace.

Select an option to see the answer and solution.

All classes in the same namespace or subnamespace don’t have to the declared in the same PHP file.

Select an option to see the answer and solution.

It is possible to create a hierarchy of namespaces in PHP.

Select an option to see the answer and solution.

The value of __NAMESPACE__ is a string that contains the current namespace name. In global, un-namespaced code, it contains . . . . . .

Select an option to see the answer and solution.