Php Interview Question and Answers
25. |
How would you find out the number of elements in an array? |
|
You can count the number of elements in an array with the count() function. |
|
|
26. |
Which function accepts a timestamp and returns an associative array representing the given date? |
|
The getdate() function returns an associative array whose elements contain aspects of the given date. |
|
|
27. |
What built-in method will be called when an object is about to be destroyed? |
|
The __destruct() method is called when an object is about to be destroyed.
|
|
|
28. |
What backslash character will match whitespace? |
|
\s will match whitespace in a PCRE. |
|
|