PHP interview questions for Freshers and experienced candidates.
Posted on 31st Jul 2013 04:38 PM
Advanced PHP online/classroom course, hyderabad: We Global I-Matrix Software Solutions are one of the best Web designing and development company in Hyderabad, India. If your search is for trust worthy developer then choose the best from our company. For more details Call Us 9000866292.mail us at : email@example.com
PHP - Interview Questions
Attending an interview for PHP developer post then be prepared with few of these technical questions. This will help you pass in interview. Apart from these i also suggest you go through few more technical interview questions ( read more ) reffered by iMatrix Solutions.
1) What is PHP?
PHP is a server side scripting language commonly used for web applications.
2) What is Full form of PHP ? Who is the father or inventor of PHP ?
Rasmus Lerdorf is known as the father of PHP that started development of PHP in 1994 for their own Personal Home Page (PHP). In 1997 changed the language's name to the.... PHP: Hypertext Preprocessor
3) How to include a file to a PHP page?
we can include a file using "include() " or "require()" function with as its parameter.
4) What's the difference between include and require?
If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
5) Is variable name case sensitive ? could we start a variable with number like $4name? What is the difference between $name and $$name?
Yes, variable name is case sensitive and we can not start a variable with number like $4name as A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.
Where as $$ is variable of variable $name is variable where as $$name is variable of variable like $name=sonia and $$name=singh so $sonia value is singh.
6) What are the method available in form submitting?
GET and POST
7) What are the differences between Get and post methods.
There are some defference between GET and POST method.
i. GET Method have some limit like only 2Kb data able to send for request. But in POST method unlimited data can we send
ii. When we use GET method requested data show in url but Not in POST method so POST method is good for send sensetive request
8) How we get IP address of client, previous reference page etc ?
By using $_SERVER['REMOTE_ADDR'],$_SERVER['HTTP_REFERER']
9) How can we submit a form without a submit button?
Java script submit() function is used for submit form without submit button on click call document.formname.submit()
10) How can we destroy the cookie?
Set the cookie in past.
11) How can we get second of the current time using date function?
$second = date("s");?
12) How can we find the number of rows in a table using MySQL?
Use this for mysql
> SELECT COUNT(*) FROM table_name;
13) How to calculate the sum of values in an array ?
"array_sum" method used for calculate sum of values in an array
14) What is the use of "ksort" in php?
It is used for sort an array by key in reverse order.
15) How many values can the SET function of MySQL take?
MySQL set can take zero or more values but at the maximum it can take 64 values
17) What are the advantages of MySQL and PHP?
Both of them are open source software (so free of cost), support cross platform. PHP is faster then ASP and JSP.
If you are going to attend PHP interview then through knowledge only PHP many not be sufficient. You must also have an idea about SEO. For that I suggest you to read the blog " every PHP developer should know ".