7 Most Popular PHP Interview Q&A For Cracking Interview!

SayTooLoud has come up with the most popular PHP interview Q&As that would help you to crack the toughest of interviews. These are some of the very basic interview questions, that most of us tend to ignore.

interview QUESTIONS

1. Who is the founder of PHP?

Rasmus Lerdorf is considered to be the father of PHP.

2. What do you understand by the term session?

A session is termed as a logical object created by the PHP engine to enable you to conserve data crosswise over subsequent HTTP requests. Sessions are normally used to store impermanent data to permit numerous PHP pages to offer a total functional transaction for the same visitor.

3. What is the use of the functions strstr and stristr?

Function strstr() is known to return some portion of a given string from the initial occurrence of a given substring to the string’s end.

E.g. :strstr(“user@example.com”,”@”) will return “@example.com”.

stristr() on the other hand, is similar to strstr() with the exception that it is case insensitive.

4. Which are the encryption functions in PHP?

MD5() and CRYPT() are the encryption functions in PHP.

5. Explain the use of the header() function in PHP

The header() function sends a crude HTTP header to a client. We can utilize herder()

function for page redirections. It becomes important to notice that the header() must be called prior to any actual output can be seen.

6. What is the method to pass a variable by value in PHP?

Similar to C++, insert an ampersand ahead of it e.g. $a=&$b;

7. What kind of inheritance is supported by PHP?

In PHP, an extended class is constantly dependent on a solitary base class, that is, multiple inheritances does not have support. Classes are extended utilizing the keyword ‘extends’.

Include these in your list of interview preparation questions and practice them by understanding them well. It would help you during interviews.

SayTooLoud wishes you all the luck !!!

Leave a Reply