PHP interview questions for freshers and experienced candidates
- 7th January 2017
PHP as a web development language offers great scope as a career. At PHP Kolkata being in the field of PHP training we have always tried to make you aware about the various aspects of a PHP career. We have covered everything from scope of PHP as a career to the salaries you can expect, like the one titled “Get to know the salary of PHP developers in India.
We hope by this time you would have gained a fair idea about PHP as a whole. However we are sure that if you want to develop a high flying career in the field, you would like to start off with an ideal job. But to do so you need to crack your job interview. So in this blog we will provide certain questions you must be well prepared for.
PHP job is great but you need to have the right knowledge
As a PHP professional in Kolkata, you could expect to start off with a starting salary of about Rs 7000 per month. But if you are able to develop yourself in the field you could even draw salaries exceeding Rs 50,000 per month as well. So it is all about how good you are at your job.
To do so you therefore need the right trainer in the field. What is also important that along with the theory you must also have practical knowledge in the field too. But no matter how much you know you should be well prepared for your job interview.
The best way to deal with your job interview is if you are prepared with answers for those questions which are expected. The following are some of the basic questions, the answers of which you should be thorough with.
PHP job interview: the answers to questions you must be thorough with
Basic Question for all PHP Developer
- Tell Me About Yourself
- Why Choose PHP?
- What Is Your Greatest Weakness?
- What Is Your Greatest Strength?
- Why Should We Hire You?
Basic Question For PHP Fresher
- What is PHP?
- What is MVC?
- What is meant by nl2br()?
- What is the maximum length of a table name, a database name, or a field name in MySQL?
- Get size of a file using php?
- Function for merging two arrays?
- How do you define a constant?
- How send email using php?
- How to find current date and time?
- How to delete a file from the system
- PHP being an open source is there any support available to it?
- How php concatenation works?
- What is the use of super-global arrays in PHP?
- What is the use of $_SERVER and $_ENV?
- Write a statement to show the joining of multiple comparisons in PHP?
- Differences between GET and POST methods ?
- How to declare an array in php?
- What is use of in_array() function in php ?
- How to set cookies in PHP and Retrieve a Cookie Value?
- How to create a session? How to set a value in session ? How to Remove data from a session?
- what types of loops exist in php?
- Acronym of PHP?
- What is the use of header() function in PHP?
- What is the array in PHP?
- How can you submit a form without a submit button?
- What is the difference between the functions unlink and unset?
- What is the method to register a variable into a session?
- What are the encryption functions in PHP?
- Explain the importance of the function htmlentities
- What is MIME?
- How can we increase the execution time of a php script?
- What is Type juggle in php?
- What is the function file_get_contents() usefull for?
- How is it possible to know the number of rows returned in result set?
- What is the static variable in function useful for?
- What is the most convenient hashing method to be used to hash passwords?
- How is the ternary conditional operator used in PHP?
- What does accessing a class via :: means?
- Are Parent constructors called implicitly inside a class constructor?
- What’s the difference between __sleep and __wakeup?
- What is the difference between mysql_fetch_object() and mysql_fetch_array()?
- What does $_FILES means?
- How can we change the maximum size of the files to be uploaded?
- What does the scope of variables means?
- What is the differences between $a != $b and $a !== $b?
- What is the goto statement useful for?
- What is the difference between Exception::getMessage and Exception::getLine ?
- What is the difference between ereg_replace() and eregi_replace()?
- What is the default session time in php?
- Is it possible to use COM component in PHP?
- How can we get the browser properties using PHP?
- How to store the uploaded file to the final location?
- What is the difference between preg_split() and explode()?
- How to upload files using PHP?
- What is the use of explode() function ?
- What is the use of mysql_real_escape_string() function?
- How to strip whitespace (or other characters) from the beginning and end of a string ?
- How to redirect a page in php?
PHP Question For PHP Experience Student
- How stop the execution of a php script ?
- Who is the father of PHP?
- What does ODBC do in context with PHP?
- What is difference between require_once(), require(), include()?
- Purpose of method attribute in html form?
- Define Object-Oriented Methodology?
- What is the difference between session_unregister() and session_unset()?
- What does $_SERVER means?
- What is Constructors and Destructors?
- How to find the length of a string?
- What is the use of rand() in php?
- What is Joomla in PHP?
- What are the different types of errors in PHP?
- What is the difference between $besant and $$besant?
- How do you connect MySQL database with PHP?
- Difference echo() and print()?
- Differentiate between require and include?
- What is the use of count() function in PHP?
- What is the use of isset() in php?
- How to get the value of current session id?
- What is sql injection?
- Is multiple inheritance supported in PHP?
- What is the meaning of a final class and a final method?
- How comparison of objects is done in PHP5?
- What is the difference between session and cookie?
- Describe functions strstr() and stristr()?
- Explain the purpose of output buffering in PHP
- How can we know the number of days between two given dates using PHP?
- How we can retrieve the data in the result set of MySQL using PHP?
- How can you retrieve a cookie value?
- Explain the difference between static and dynamic websites?
- What is the name of scripting engine in PHP?
- What are the methods of form submitting in PHP?
- What is a session?
- What is needed to be able to use image function?
- What is the use of the function ‘imagetypes()’?
- What are the functions to be used to get the image’s properties (size, width and height)?
- How is it possible to set an infinite execution time for PHP script?
- What does the PHP error ‘Parse error in PHP – unexpected T_variable at line x’ means?
- What is the meaning of a Persistent Cookie?
- When sessions ends?
These are some of the very basic questions you must be able to answer with confidence. We are sure that if your concepts about PHP are clear, you would be able to handle any question which is asked.
However if you are asked to answer a question, which you do not know, it is best to admit that you do not know. It is better than to pretend you know and then not being able to answer it. Interviewers are always experienced. So it is best to be honest with them always. This is something which they surely would appreciate. Your honesty along with your knowledge levels would help you get selected.
We have been in the PHP training field for more than 10 years. So not only do we provide the best training in the field, but also ensure that you get well prepared for your job interviews.