Home Interview Questions and Answers PHP Interview questions and Answers For Graduates Part-1

php1. Who is the father of PHP ?
Rasmus Lerdorf is known as the father of PHP.

2. What is the difference between $name and $$name?
$name is variable where as $$name is reference variable like $name=sonia and $$name=singh so $sonia value is singh.

3. What are the method available in form submitting?


4.How can we get the browser properties using PHP?


echo $_SERVER[‘HTTP_USER_AGENT’].”\n\n”;

5. What Is a Session?

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.

6. How can we register the variables into a session?


7. How many ways we can pass the variable through the navigation between the pages?

Register the variable into the session
Pass the variable as a cookie
Pass the variable as part of the URL

8. How can we know the total number of elements of Array?


9. How can we create a database using php?


10. What is the functionality of the function strstr and stristr?

strstr() returns part of a given string from the first occurrence of a given substring to the end of the string.
For example:strstr(“[email protected]”,”@”) will return “@example.com”.
stristr() is idential to strstr() except that it is case insensitive.

You may also like

Leave a Comment