Click to See Complete Forum and Search --> : php interview questions
phpprogrammer
10-13-2003, 12:09 AM
Dear All,
expecting some more questions which you people faced in your interviews
sharing of interview questions is also important like sharing of php knowledge
regards
bvsureshbabu
phpprogrammer
10-13-2003, 12:11 AM
INTERVIEW 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 php versions
3. How can we submit a from without a submit button
4. Howmany ways we can retrieve the date in resultset 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 'abc.com ' from a string 'http://info@abc.com' using regular expression of php
8. how can we create a database using mysql
9. what is the differences between require and include, include_once
10. can we use include("abc.php") two times in a php age "makeit.php"
11. what are the different tables present in mysql , which type of table is genereted 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 <?php ?> mode
15. shoppingcart online validation ie how can we configure the paypals
16. what is meant my nl2br()
17. draw the architecture of zend engine
18. what are the current versions of apache, php, mysql
19. what are the reasons for selecting lamp(linux,apache,mysql,php) instead of combination of other software programmes,servres and operating systesm
20. how can we encrypt and decrypt a data present in a mysqltable 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 frined 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 functio
32. how can we convert the timezones 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 varials 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 maxmimum 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 a 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. howmany 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. howmany 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. how many ways we upload a file using php
52. how can i retrieve vaues 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 is the difference betwen abstract class and interface
56. how can we send mail using javascript
57. how can we repair a mysql table
58. what are the advantages of storedprocedures, triggers, indexes
59. what is the maxmimum length of a table name,databasename, fieldname in mysql
60. howmany values can the SET function of mysql takes
61. what are the othter commands to know the structure of table using mysql commands except explain command
62. How many tables will create when we create table, whay are they
63. what is the purpose of the following files having extensions 1)frm 2)MYD 3)MYI
64. what is maximum size of a database in mysql
65. Give the syntax of Grant and Revoke commands
66. Explain Normalization concept
67. how can we find the number of rows in a table using mysql
68. how can we find the number of rows in a resultset using php
69. howmany ways we can we find the current date using mysql
70. what are the advantages and disadvantages of CASCADE STYLE SHEETS
71. what type of inhertance that php supports
72. how can increase the performance of mysql select query
73. The structure of table viewbuyers is
+----------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+----------------+
| user_pri_id | int(15) | | PRI | NULL | auto_increment |
| userid | varchar(10) | YES | | NULL | |
+----------------+-------------+------+-----+---------+----------------+
the value of user_pri_id the lastrow 2345 then what will happen in the following conditions 1) Condition1: Delete all the rows and insert another row then what is the starting value for this autoincremented field user_pri_id , 2) Condition2: Delete the lastrow(having the field value 2345) and insert another row then what is the value for this autoincremented field user_pri_id
74. what are the advantages/disadvantages of mysql and php
75. what is the difference between GROUP BY and ORDER BY in sql
76. what is the difference between char and varchar datatypes
77. what is the functionality of md5 function in php
78. how can i load data from a text file into a table
79. how can we know the number of days between two given dates using mysql
80. how can we know the number of days between two given dates using php
81. how can we change the name of a column of a table
82. how can we change the name and data type of a column of a table
83. what are the differences between drop a table and truncate a table
84. When you want to show some part of a text displayed on an HTML page in red font color, what different possibilites are there to do this? What are the advantages/disadvantages of these methods?
85. When viewing an HTML page in a Browser, the Browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
86. What are the different methods of passing data or information between two calls of a web page? What are the advantages/disadvantages of these methods?
87. An Apache webserver is running on a Linux system. Suddenly, the webserver delivers the pages very slow. How could you find out possible reasons for that (when using system commands, please specify their names)?
88. What are the different ways to login to a remote server? Explain the means, advantages and disadvantages?
89. Please give a regular expression (preferably Perl/PREG style) which can be used to identify the URL from within a HTML link tag. Example: The regular expression should match the tag <A HREF="http://www.baba9.com/"> and give the URL ("http://www.baba9.com/") as a return result. Tags should also be matched if they contain other attributes than the HREF attribute.
90. A select query over a large table runs very slow because of the growing number of entries in that table. What different measures could be taken to improve speed?
91. A company wants to store their invoices in a database. They already have their customers and articles in that database. Both customer and article are each identifed by an unique integer value. Please create the SQL statements for creating the necessary table(s) for storing the invoices in a MySQL database. An invoice should hold information like invoice number, customer, date, article(s) and quantity etc.
92. For the database from the previous question, please give an SQL query which returns the invoice number of all invoices which contain the article with the number "1234". The query should be able to run under a MySQL 4.0 database.
93. How would you backup and restore a big MySQL database? What are the advantages of the approach which you have taken over the others?
94. Create a PHP web script with the following attributes: on start, three HTML form elements are shown: an string input field, a checkbox field, a dropdown/pulldown list with 5 elements and a submit button. On submission, the form should be redisplayed (while remaining all options/inputs as the user has selected/entered them). Additionally, the selections/inputs of the user should be displayed in text. Please solve this without the use of any external libraries.
95. what is meant by MIME
96. what is meant by PEAR in php
97. how can I use the com components in php
98. how can I load the dll’s dynamically
99. how many ways we can give the output to a browser
100. how can we know that a session is started or not
Weedpacket
10-13-2003, 03:34 AM
No.24's got me beat. :)
Moving this to a more appropriate forum, where I suspect it will get better mileage.
laserlight
10-13-2003, 05:16 AM
hmm... they are interviewing for PHP5 as well?
I presume "frined" means "friend", or we could use it to fry poor Ned.
bad76
10-13-2003, 05:52 AM
Wow, i can answer right now, just 30 on 100 !!!
Then i don't know how to program in php...
Really i have to memorize php manual to program with it ?
Weedpacket
10-13-2003, 06:00 AM
I thought so at first, but PHP5 doesn't have friend methods, either.
jstarkey
10-13-2003, 12:52 PM
Originally posted by Weedpacket
I thought so at first, but PHP5 doesn't have friend methods, either.
Friends is actually a predefined array :D
LordShryku
10-13-2003, 01:03 PM
Originally posted by bad76
Wow, i can answer right now, just 30 on 100 !!!
Then i don't know how to program in php...
Really i have to memorize php manual to program with it ?
No kidding...
According to those questions, I'd never get hired as a php coder...
Those questions also seem to have a whole lot to do with MySQL in particular, when the most common enterprise db solution is Oracle....
bad76
10-13-2003, 01:16 PM
Originally posted by LordShryku
Those questions also seem to have a whole lot to do with MySQL in particular, when the most common enterprise db solution is Oracle....
Are you sure? I don't know...
....but now i want be more constructive (i hope)...
i think will ask some like:
"you have to do an html table 3x3. do you use FOR or WHILE ? Why ?"
"Tell me some possible way to find in any array. If is too slow, i can run faster changing PC?"
LordShryku
10-13-2003, 01:23 PM
I'm fairly sure. We'll have to get the input of more of the DB guys here. MySQL is popular among web programmers, cuz it's free, fast and reliable. Most businesses have gone with Oracle(methinks), because of it's training, licensing, and support. It's also a bit more robust, being able to supoprt sub-queries, triggers, stored procedures, etc, etc, etc. If you combined MySQL and PostgreSQL, you would pretty much have Oracle. I'd like to hear from some more of the guys in the big businesses....
i agree with the lord... oracle is just business standard (at least above a certain size).
Merve
10-13-2003, 02:00 PM
Great! I can answer about 5 of those questions :D
LordShryku
10-13-2003, 02:06 PM
Originally posted by Merve
Great! I can answer about 5 of those questions :D
Yah, me too. Is this an open book test? I'll need to look up the life story of "the father of php".
Merve
10-13-2003, 02:08 PM
I don't need to know all this stuff. I use my narrow knowledge of PHP to create useless things that nobody would ever REALLY need, such as online calculators, funky MadLibs, guestbooks, and games. I don't really do anything all too useful with PHP.
Why the hell care if I'm not even doing all this crazy stuff?
piersk
10-13-2003, 04:55 PM
Originally posted by jstarkey
Friends is actually a predefined array :D
Showoff!:rolleyes:
Weedpacket
10-13-2003, 05:06 PM
Originally posted by jstarkey
Friends is actually a predefined array :D Oh, right; it's the one that goes on for too long, isn't it?
laserlight
10-14-2003, 12:25 AM
*starts singing*
friends are friends forever...
well, if friend refers to a predefined array, then a question with "friend function" is a wrong question.
quick, fire the interviewer!
Weedpacket
10-15-2003, 06:09 AM
But yes no, they are good questions. Some are not PHP - PostgreSQL shops wouldn't have much use for a "how do you repair a MySQL table?" question - but an appropriate replacement that tests what is relevant can certainly be formulated.
phpprogrammer
04-02-2004, 06:05 AM
Dear All,
Some more questions
1) what is the default session time in php and how can i change it.
2) what changes I have to done in php.ini file for fileuploading.
3) what are the differences between mysql_fetch_array(),mysql_fetch_object(),mysql_fetch_row()
4) how can i set a cron and how can i execute it in unix,linux, windows
5) steps for the payment gateway processing
6) howmany ways i can register the varables into session , how
7) explain different types of errors in php( ie varguments in errorreporting function)
8) how many ways i can redirect a php page
9) list out different arguments in php header function
10) what type of headers i have to send in the mail function in which file a attatched
regards
bvsureshbabu
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.