PHP developer interview questions
Even if the interviewer doesn't know the answers to these questions, they could probably get a good idea for a job candidate's comfort with the material from how much they stutter and squirm after each question.
General
- What are the current versions of Apache, PHP, and MySQL?
- What is a cookie and how is it useful?
- If you run into a problem while coding, what steps do you take to find the answer?
- What files are commonly found in these standard UNIX directories?
- /bin
- /boot
- /dev
- /etc
- /home
- /mnt
- /tmp
- /var
HTML
- When you want to show some part of a text displayed on an HTML page in red font color, what different possibilities are there to do this? What are the advantages and disadvantages of these methods?
- What's the difference between and
CSS
- What is the primary advantage of CSS?
- Describe the different ways to have content initially hidden on a page?
- Explain the purpose and implementation of a float?
- Describe the inherent CSS differences between IE and Mozilla.
Javascript
- How can we submit a form without a submit button?
- Do you use DHTML and Javascript? Describe the projects you've used them in.
- Describe some methods to redirect a page in Javascript and PHP.
PHP
- What is the difference between $message and $$message?
- What are the differences between PHP3, PHP4, and PHP5?
- How can I execute a PHP script using the command line?
- How can we increase the execution time of a PHP script?
- What are public, private, protected, and static methods?
- What is an abstract class and interface?
- What is meant by urlencode and urldecode?
- How do you set a session variable?
- How do you set a cookie? How about reading the value within the same page execution?
- What are two different ways of unsetting a cookie on the user's machine?
- How do you encrypt data using PHP?
- What is the difference between an enumerated array and an associative/hashed array?
- What are the differences between require, include, and include_once?
- How do you increase the allowable execution time of any PHP script?
- What will this output?
<?php
$a = false;
$b = true;
$c = false;
if ($a ? $b : $c) {
echo 'false';
} else {
echo 'true';
}
?>
- What will this output?
<?php
$txt_var1 = "PHP";
$txt_var2 = &$txt_str1;
$txt_var2 = "MySQL";
echo $txt_var1 . $txt_var2;
?>
- What does this do?
<?php
if (isset($_REQUEST))
while(list($varname, $varvalue) = each($_REQUEST)) { $$varname = $variable; }
?>
MySQL
- How can we repair a MySQL table?
- A select query over a large table runs very slow because of the growing number of entries in a table. What different measures could be taken to improve speed?
- What are different types of tables in MySQL and their differences.
- What is the difference between GROUP BY and ORDER BY in SQL?
- How do you encrypt data present in a MySQL table using MySQL?
- What is an EXPLAIN? What does its result look like?
- What is an alias? What elements can be aliased and how would one do so?
- What are 3 different methods of adding data to a table?
- What is the difference between "DELETE FROM [...]" and "TRUNCATE TABLE [...]"?
Misc
Elaborate on the following acronyms:
- LAMP
- SNMP
- ODBC
- IMAP
- TCP
- PHP
- SQL
- ASP
- SSL
- API
- XML
- XSLT
- XHTML
- AJAX
- JSON
- SOAP
- JAVA
» deekayen's blog ·
·
·
Topics: PHP
·
·
Topics: PHP


Post new comment