PHP Interview Questions
Hello Everyone…. I’ve attended two interviews in last month I would like to share the questions which were asked to me during the technical HR.
It was basically Web designing and development companies. So most of the questions were from PHP, MySQL, C and C++. I’ll tell you want happened there as I remember now.
PHP is an interpreter or compiler language?
As far as I know it’s an interpreter language. So I said as interpreter. Then he asked what the use of Apache there? I said for compiling. Here I got confused with my basic L
Next question I remember is What are the array functions?
I remember only count at that time of interview. After coming to home I was hurried in browsing the answers for this array functions I found few like ksort(), sort(), in_array(), etc… Here is the site where I found the answers
Then How to display the error in PHP?
I said by using try… catch… throw. HR asked there is some inbuilt function is there do you know that. I said I don’t have any idea of that.
Difference between include and include_once()?
I knew only about include function which is used to include one file in another PHP file. I had no idea about include_once and I’ve never used that too. I said the same to the HR.
Later I found the answer from this Site
Then what I remember is How will you print a statement?
I said by using echo. He asked some other alternative for echo. I said print. Hope that is correct answer. After coming out my friends said that we can use printf too.
Then from OOPS What is mean by polymorphism?
I said Many functions in one form
Then the question i got is Is MySQL DBMS or RDBMS?
I said its RDBMS. Then he asked the properties of RDBMS. Now i got struck again since i dont know about database basics too
Then he asked about my project and my part in the project. I said Database Maintenance.
So i got few basic questions like what is primary key, unique key and their difference.
And about foreign key. I answered for all these questions correctly. Hope you all know the answers for these.
He asked about few technologies used in their company. So be updated with the company profile and their technology used before you attend any interviews.
Then he asked about my family members. And what are the basic things to be a good team player. He expected the only answer from me that is to help other team members when they want to finish their module.
This is what I remember the questions which are asked for me.
In the next company I have got two C programs and few SQL queries.
In SQL Query They gave three tables and asked to retrieve each field from each table and in one question they asked to sum up the values and display that as one field. For which I’ve not tried to search the answers. If any of you get the answer kindly comment it below.
Then for C Program they gave two patterns like I’ve to print
5 4 3
5 4 3 2
5 4 3 2 1
Hope these programs are easy.
Then in HR I just got two questions
One is Difference between include and require?
Include/include_once will just insert the code in the script. This will produce a warning if the file does not exist
Require/require_once will also insert the code but will result in a fatal error if file does not exist
Then What is the difference between get and post method?
In get method the address in URL is visible and it can transfer only limited information. It’s not secured too
In Post method the address in URL is invisible and there is no limit for transferring information. When compared to get method post is more secured.
These are the questions which i faced. Share your comments below if you’ve any doubts 🙂