1. What is the purpose of continue statement?

continue causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

2. What is the purpose of _CLASS_ constant?

_CLASS_ − The class name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the class name as it was declared (case-sensitive). In PHP 4 its value is always lowercased.

3. What is the purpose of _METHOD_ constant?

_METHOD_ − The class method name. (Added in PHP 5.0.0) The method name is returned as it was declared (case-sensitive).

4. Can you assign the default values to a function parameters?

Yes! You can set a parameter to have a default value if the function's caller doesn't pass it.

5. What is associate array in PHP?

Associative array − An array with strings as index. This stores element values in association with key values rather than in a strict linear index order.

6. What are PHP magic constants?

PHP provides a large number of predefined constants to any script which it runs known as magic constants.

8. What do you mean by having PHP as whitespace insensitive?

Whitespace is the stuff you type that is typically invisible on the screen, including spaces, tabs, and carriage returns (end-of-line characters). PHP whitespace insensitive means that it almost never matters how many whitespace characters you have in a row.one whitespace character is the same as many such characters.

9. What is the purpse $_REQUEST variable?

The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE. We will discuss $_COOKIE variable when we will explain about cookies. The PHP $_REQUEST variable can be used to get the result from form data sent with both the GET and POST methods.

10. What is the purpose of _LINE_ constant?

_LINE_ − The current line number of the file.

Download Interview PDF