PHP interview questions
Some of the Best PHP Based Interview Questions for the recent graduates to help them in their Interview in PHP
- What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?
- Who is the father of PHP and explain the changes in PHP versions?
- How can we submit a form without a submit button?
- In how many ways we can retrieve the date in the result set of mysql using PHP?
- What is the difference between mysql_fetch_object and mysql_fetch_array?
- What is the difference between $message and $$message?
- How can we extract string ‘theWalkin.com ‘ from a string ‘http://www.TheWalkin.com’ using regular expression of PHP?
- How can we create a database using PHP and mysql?
- What are the differences between require and include, include_once?
- Can we use include (”TheWalkin.php”) two times in a PHP page “makeit.PHP”?
- What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?
- Functions in IMAP, POP3 AND LDAP?
- How can I execute a PHP script using command line?
- Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
- Shopping cart online validation i.e. how can we configure Paypal, etc.?
- What is meant by nl2br()?
- Draw the architecture of Zend engine?
- What are the current versions of apache, PHP, and mysql?
- What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?
- How can we encrypt and decrypt a data present in a mysql table using mysql?
- How can we encrypt the username and password using PHP?
- What are the features and advantages of object-oriented programming?
- What are the differences between procedure-oriented languages and object-oriented languages?
- What is the use of friend function?
- What are the differences between public, private, protected, static, transient, final and volatile?
- What are the different types of errors in PHP?
- What is the functionality of the function strstr and stristr?
- What are the differences between PHP 3 and PHP 4 and PHP 5?
- How can we convert asp pages to PHP pages?
- What is the functionality of the function htmlentities?
- How can we get second of the current time using date function?
- How can we convert the time zones using PHP?
- What is meant by urlencode and urldocode?
- What is the difference between the functions unlink and unset?
- How can we register the variables into a session?
- How can we get the properties (size, type, width, height) of an image using PHP image functions?
- How can we get the browser properties using PHP?
- What is the maximum size of a file that can be uploaded using PHP and how can we change this?
- How can we increase the execution time of a PHP script?
- How can we take a backup of a mysql table and how can we restore it. ?
- How can we optimize or increase the speed of a mysql select query?
- How many ways can we get the value of current session id?
- How can we destroy the session, how can we unset the variable of a session?
- How can we destroy the cookie?
- How many ways we can pass the variable through the navigation between the pages?
- What is the difference between ereg_replace() and eregi_replace()?
- What are the different functions in sorting an array?
- How can we know the count/number of elements of an array?
- What is the PHP predefined variable that tells the What types of images that PHP supports?
- How can I know that a variable is a number or not using a JavaScript?
- List out some tools through which we can draw E-R diagrams for mysql.
- How can I retrieve values from one database server and store them in other database server using PHP?
- List out the predefined classes in PHP?
- How can I make a script that can be bilanguage (supports English, German)?
- What are the difference between abstract class and interface?
- How can we send mail using JavaScript?
To Read Part – II Click Here
my e-mail id is below….
amit.kumarmt,[email protected]
hello friends…
what should i do…. which can i get a job?
i m fresser ….
tell me…
your friend
amit
plz send me answer of these questions
dear friend
i am going interview call center plz my help send a good introduction.. my email id is [email protected] plz help
your friend
dear friend
i am going interview call center plz my help send a good introduction
plz send me answer of these questions
will u send me the answers of all the questions
attempt is very good and hlpful,plz snd the answers also plzzzzzzzzzzzz
hiiiiiii the above question are good, please send the Answers of these questions on my e-mail id
plse…
plse…
hey plz send the answers of the above questions…it would be really helpful..thnx in advance
hiiiiiii the above question are good, please send the Answers of these questions on my e-mail id
hiiiiiii the above question are good, please send the Answers of these questions on my e-mail id
plse…
plse…
Hi These are very useful for my prepration but i wanna answer for the questions…
hi the above question are good, please send the Answers of these questions on my e-mail id
plse…
plse
helpful…
COULD YOU SEND ME THE ANSWERS TO THE FOLLOWING QUESTIONS 1. What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?
2. Who is the father of PHP and explain the changes in PHP versions?
3. How can we submit a form without a submit button?
4. In how many ways we can retrieve the date in the result set of mysql using PHP?
5. What is the difference between mysql_fetch_object and mysql_fetch_array?
6. What is the difference between $message and $$message?
7. How can we extract string ‘theWalkin.com ‘ from a string ‘http://www.TheWalkin.com’ using regular expression of PHP?
8. How can we create a database using PHP and mysql?
9. What are the differences between require and include, include_once?
10. Can we use include (”TheWalkin.php”) two times in a PHP page “makeit.PHP”?
11. What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?
12. Functions in IMAP, POP3 AND LDAP?
13. How can I execute a PHP script using command line?
14. Suppose your Zend engine supports the mode Then how can u configure your PHP Zend engine to support mode ?
15. Shopping cart online validation i.e. how can we configure Paypal, etc.?
16. What is meant by nl2br()?
17. Draw the architecture of Zend engine?
18. What are the current versions of apache, PHP, and mysql?
19. What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?
20. How can we encrypt and decrypt a data present in a mysql table using mysql?
21. How can we encrypt the username and password using PHP?
22. What are the features and advantages of object-oriented programming?
23. What are the differences between procedure-oriented languages and object-oriented languages?
24. What is the use of friend function?
25. What are the differences between public, private, protected, static, transient, final and volatile?
26. What are the different types of errors in PHP?
27. What is the functionality of the function strstr and stristr?
28. What are the differences between PHP 3 and PHP 4 and PHP 5?
29. How can we convert asp pages to PHP pages?
30. What is the functionality of the function htmlentities?
31. How can we get second of the current time using date function?
32. How can we convert the time zones using PHP?
33. What is meant by urlencode and urldocode?
34. What is the difference between the functions unlink and unset?
35. How can we register the variables into a session?
36. How can we get the properties (size, type, width, height) of an image using PHP image functions?
37. How can we get the browser properties using PHP?
38. What is the maximum size of a file that can be uploaded using PHP and how can we change this?
39. How can we increase the execution time of a PHP script?
40. How can we take a backup of a mysql table and how can we restore it. ?
41. How can we optimize or increase the speed of a mysql select query?
42. How many ways can we get the value of current session id?
43. How can we destroy the session, how can we unset the variable of a session?
44. How can we destroy the cookie?
45. How many ways we can pass the variable through the navigation between the pages?
46. What is the difference between ereg_replace() and eregi_replace()?
47. What are the different functions in sorting an array?
48. How can we know the count/number of elements of an array?
49. What is the PHP predefined variable that tells the What types of images that PHP supports?
50. How can I know that a variable is a number or not using a JavaScript?
51. List out some tools through which we can draw E-R diagrams for mysql.
52. How can I retrieve values from one database server and store them in other database server using PHP?
53. List out the predefined classes in PHP?
54. How can I make a script that can be bilanguage (supports English, German)?
55. What are the difference between abstract class and interface?
56. How can we send mail using JavaScript?
i too want answers for these questions
hi this is narendra kumar can any body send me answeres for my mail id please
hiiiiiii the above question are good………….
Hi dear ,
Actually the above questions are good.please send the answers of these questions on my email id
Thank You
Rangaballav swain
For The Above Questions Please Send Me The Answer
plz send the answer
I need answer for all question .Please send the answer on my-e-mail id
Hiiiiiiiii.
the above question are good . please send the answer of the quwestion on my e-mail id .
please sir . i request u..
please send the answer my email id……
Please send the answers on my email- id
hi,
the above questions are very useful to my preparation that’s why please send the answers of these questions . Those are very helpful to me. Please.
Hi These are very useful for my prepration but i wanna answer for the questions…
hiiiiiii the above question are good, please send the Answers of these questions on my e-mail id
plse…
plse…
please send me this questions answers……….to my mail id
Hi,
Please send me the answers to all these questions.
Thanks
Deepanshu
please send the answer of thease questions.
please send the answers for the above questions
kindly requested to the ATHENCIED SOFT WARE SOLUTION
HYDERABAD, KATCHEE GUDA
How can i get u the answers of the above questions?
If this is available in net than plz give me a link of this website..
want to learn more about php or web development visit http://www.orxzen.com/blog/
i am wants to each and every php interview question with answer so any body send me answer………….
Pls send all answers from above question
Plz send me Ans of the question
please send the Answers of these questions on my e-mail id
plz send me all answers .
plz send me the answers
Hi!
My name is Vikas.I Above questions are good but u have to provide answers of above question.So I request to you Please send me answers of above questions through e-mail on my id
I am Hoping for best Reply.
Thank You.
VIKAS DEEP SINGH
plz send the answer of above questions
will u plz send me the answers of the above questions…
please send answer of all question in my email adress. thank you
Please send all answers from above question in my mail id.
Hai,
I know answer some of the question.Remaining one i don’t know correctly,If you send its list of answer it useful to me
Bye
Shylaja
Please send me the answers for the above said questions please
Please send me the answers to the above question part 1 and 2.
hi!
the above question is very good.
How can i get u the answers of the above questions?
If this is available in net than plz give me a link of this website to my email id..
thank you.
hi!
thank you for ur helful qeustions. I request to you Please send me answer list of above questions in my mail id with question.
thank you.
Gobind
Pls send all answers from above question
How can i get u the answers of the above questions?
If this is available in net than plz give me a link of this website..
Please send me the answers to the above question part 1 and 2, is it possible ? thx
Hi!
My name is kushal.I know above questions are good but u have to provide answers of above question.So I request to you Please send me answer list of above questions in my mail id.
Hoping For best Reply.
Sorry for any mistakes.
Thank You.
Kushal.
Hello
i am suman thakur.Above questions definetly will help us but u have to provide answers of above question.So I request to you Please send me answer the of above questions in my mail id.
Hoping For best Reply.
Sorry for any mistakes.
Thank You.
suman
Difference between Https request and http
please send all answers from above question in my mail id.
Any one can tell me about prospect of PHP & its open sources
which one career is better PHP or Open source?
Every day PHP Script is going to be change a lot
thanx swapna and sanjay for ur nice responce and update answers
it helpd a lot
though some r not correct bt still appreciate ur effort
please send all the answers in my email-id
to convert Decimal number to Binary just use “decbin()” function…
to convert Binary number to Decimal just use “bindec()”
function…
Will you please send the Qn & Answers of above Questions
it’s nice quetions. but i need answer of these question .please send me a answer of the question
my best wishes to you… can you send me a mail..
ok… thank you..
[email protected]
answers is good ,please sent me to mail
Will you please send the Qn & Answers of above Questions
can any send me the answers….
Pls send all answers from above question
please send answers to these questions
Please give me answers in my mail Id.
Thanks If u Send
Hi!
My name is Jaydev.I know above questions are good but u have to provide answers of above question.So I request to you Please send me answer list of above questions in my mail id.
Hoping For best Reply.
Sorry for any mistakes.
Thank You.
JayDev.
pls send the answers of these question to my mail id
thanks
abhinit
Questions are very good but i want the answer immediatle.please help me.
What are the difference between abstract class and interface?
There are some differences which of some are below..
1.Interface can only contain abstract methods, properties but we don’t need to put abstract and public keyword. All the methods and properties defined in Interface are by default public and abstract.
2.Abstact class is a abstract view of any realword entity and interface is more abstract one.
i need answers of above questions
plz send all answers from above questions.
thank u
venkat.V
can i get answers for above questions?
If anybody can, help me.
my email is [email protected]
thanks.
plz send all answers from above questions.
thank u
i need a answer to the questions
nice na!!!
plz send all answers from above questions.
thank u
openssl genrsa -des3 -out server.key 1024
help me out to find the ans of these quesctions. on this site there is no way fo find the ans. So plz send me the ans of all quesctions to my mail id.
please help me to get the answers of the above questions.
Please Could you send me all answers of thats questions..
PHP Does not support OOP Completely.
Is php support oops concepts.
Shall i get answers for above questions?
If anybody can, help me.
my email is [email protected]
thanks.
plz send all answers from above questions.
thank u
WHICH TYPE OF TEXT WE HAVE TO SAVE AS .HTML,.PHP . PLS EXPLAIN THE DIFFERENCE
Hi all,
Please send me answer of these question to my mail id – [email protected]
Thanks
question are good……..but i couldn’t find answer…………….answer plz………….
could send me answers for all tha questions mentioned above……plz
please help me to get the answers of the above questions.
i need the answers for these questions please send me
i want answers for above questions……………….Plz send me……………..
PHP interview question
very good but no answers
i saw u r questions i ts very intrestion i need answers to that questions please send me
give tha answers of above questions
i need the answers for the above questions please
it’s nice quetions. but i need answer of these question .please send me a answer of the question
i saw ur interview questions. please give answers the above questions
The collection of Question is very good but answer is not available , so plz send me answer of these question.
hey if u want to know all ans then look above url
please i need answers of the above questions…
How can we optimize or increase the speed of a mysql select query?
using LIMIT,COUNT AND CONSRAINTS LIKE
foreignkey and primary key are used to increase the speed of a mysql select query.
List out the predefined classes in php?
Directory
stdClass
__PHP_Incomplete_Class
exception
php_user_filter
How can we increase the execution time of a PHP script?
set max_execution_time() in php.ini file
How can we register the variables into a session?
session_register()
unlink delete the file from the file system
unset make a variable undefine.
How can we convert the time zones using PHP?
urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode(“10.00%”) will return “10%2E00%25?. URL encoded strings are safe to be used as part of URLs.
urldecode() returns the URL decoded version of the given string.
What is the functionality of the function strstr and stristr?
stratr() returns that part of the substring to the end to the end of that string [email protected]
it will disply the output @yahoo.com
stristr() is idential to strstr() except that it is case insensitive.
How can we get second of the current time using date function?
for exm:-
$date1=$date(‘y-m-d’);
$date2=’2008-8-14′
$day=(strtotime()-strtotime())/(60*60*24);
we encrypt and decrypt a data present in a mysql table using mysql?
AES_ENCRYPT () and AES_DECRYPT ()
we encrypt the username and password using php?
You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD(“Password”);
We can encode data using base64_encode($string) and can decode using base64_decode($string);
3 types of errors in PHP?
1)Notics
2)Fatal
3)warnings
Functions are written sequentially, so that a change in programming can affect any code that follows it.
If a function is used multiple times in a system (i.e., a piece of code that manages the date), it is often simply cut and pasted into each program (i.e., a change log, order function, fulfillment system, etc). If a date change is needed (i.e., Y2K when the code needed to be changed to handle four numerical digits instead of two), all these pieces of code must be found, modified, and tested.
Code (sequences of computer instructions) and data (information on which the instructions operates on) are kept separate. Multiple sets of code can access and modify one set of data. One set of code may rely on data in multiple places. Multiple sets of code and data are required to work together. Changes made to any of the code sets and data sets can cause problems through out the system.
Object-Oriented programming takes a radically different approach:
Code and data are merged into one indivisible item – an object (the term “component” has also been used to describe an object.) An object is an abstraction of a set of real-world things (for example, an object may be created around “date”) The object would contain all information and functionality for that thing (A date
object it may contain labels like January, February, Tuesday, Wednesday. It may contain functionality that manages leap years, determines if it is a business day or a holiday, etc., See Fig. 1). Ideally, information about a particular thing should reside in only one place in a system. The information within an object is encapsulated (or hidden) from the rest of the system.
A system is composed of multiple objects (i.e., date function, reports, order processing, etc., See Fig 2). When one object needs information from another object, a request is sent asking for specific information. (for example, a report object may need to know what today’s date is and will send a request to the date object) These requests are called messages and each object has an interface that manages messages.
OO programming languages include features such as “class”, “instance”, “inheritance”, and “polymorphism” that increase the power and flexibility of an object.
One of the main advantages of OO programming is its ease of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns.
For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.
lamp (linux, apache, mysql, PHP).Linux operating system provide more security than windows.Apache server is more faster than other servers.php is faster than ASP and other scripting languages. all are open source softwares
What are the current versions of apache, PHP, and mysql?
APACHE-2.1
PHP 5.2.1
MYSQL-5.1
nl2br() is used in HTML .nl2br function is used to print the next line .
ex:-echo “Good morning \n Everybody”
It prints
Good morning
Everybody
Differences between require and include, include_once?
If the file is not included reqire shows the error and stop the execution.Include shows the warning won’t stop the exceution.
include_once if the file is included more than once it shows the warning.
create Database/Scheme [IF/NOT EXISTS]
Databasename
[create-specification]
[enginee=’MYISAM’];
$message is a variable and $$message is a reference variable.
Retrieve the date in the result set of mysql using PHP IN
mysql_fetch_array()
mysql_fetch_object()
mysql_fetch_row()
mysql_fetch_assoc()
We can submit the button without form in 3 ways.
1)write java script function in onclick
2)write javascript function in onload
3)Using ajax function
“Rasums Lerdorf” was the father of php.He intorduced in 1994.
Get,Post method are used to carry data or values to another page.Get method shows tha data in adress bar this is limited data only carry.Post methos does’t shows the output dat in adress bar it has not limit specification.It provide secrecy.
which function is used for read and write a file
ans.fopen
q2. what is the value of $$a where
$a=5
$b=$a
ans. 5
the questions are very good but i need answer of these question .please send me a answer of the question
how can get the answers of the above questions??
i need the answers for the above questions please.
Q:What are the different functions in sorting an array?
A: The functions for sorting array are following:
1- sort($array)- is used for enumerated array(numeric array)
sorts the array element in asending order.
2- rsort($array)- is used for enumerated array,sorts the array element in decending order.
3- asort($array)- is used for associative array,sorts the array value in asending order.
4- arsort($array)- is used for associative array,sorts the array value in decending order.
5- ksort($array)- is used for associative array,sorts the array keys in asending order.
6- krsort($array)- is used for associative array,sorts the array keys in decending order.
Q;Who was the father of PHP?
A; “Rasmus Lerdorf” was the father of PHP. He introduced php in 1995.
Q:How can we know the count/number of elements of an array?
A:
//returns 4
count() function returns the no of elements of its argument.
It returns 1 for scalar variables.
//returns 1
Q:How can we create a database using PHP and mysql?
A:
In the earlier versions of PHP we were using
mysql_create_db($dbstring,$link) to create a databse,but PHP5 n latest versions of PHP do not support this function.
Now we will have to use
mysql_query(“create database databasename”); to create database.
mysql_drop_db($dbname,$link) is also not supported by PHP5 n onwards versions.
what is a meaning of
Q:-How can we know the count/number of elements of an array?
Ans:
count(arrayname);
How can we create a database using PHP and mysql?
We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.
What is the difference between $message and $$message?
$message is simple variable
$$message is reference variable
In how many ways we can retrieve the date in the result set of mysql using PHP?
Ans
we can do 4 ways
1 mysql_fetch_row
2 mysql_fetch_array
3 mysql_fetch_object
4 mysql_fetch_assoc
How can we submit a form without a submit button?
Ans there is work with java script function document.formname.submit() method to on click on change event of different input and perform the form submission.
Who is the father of PHP and explain the changes in PHP versions?
Rasmus Lerdorf is known as father of php.
q1 .What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?
Ans. When we submit a form, which has the GET method it displays pair of name/value used in the form at the address bar of the browser preceded by url. Post method doesn’t display these values.
Good list of questions but useless without the answers
How can i get answers of all the questions….
please help me to get these answers….
I need the answers of the above questions.
How can i get answers of all the questions….
please help me to get these answers….
How can i get u the answers of the above questions
answer of above question available??????