include top.php,Top PHP Job Interview Questions and Answers for 2014

Are you going to face an interview for PHP job and looking for top asked

interview questions. Here we are providing a list for the question and

their answers which are very common but very frequently asked in

interviews conducted for the PHP related jobs. Every company has their

own criteria for interview and questions are totally depends upon your

role for the job and your skills also.

Q. Tell something about PHP.

Ans. PHP stands for: Hypertext Preprocessor. PHP is a server side scripting language which is used to develop the dynamic websites.

Q. What is MVC?

Ans. MVC stands for Model, View, and Controller. PHP MVC is an effective way to manage the code into 3 different layers.

Model:  Model represents the information in application.

View: View represents the visual representation of information and data that you have entered in the application.

Controller: Controller is actually how and in which way you want to read the information in application.

Q. What are the different types of CSS you can add in a page?

Ans. There are three types of CSS that can be added in a page.

1. External CSS.

2. Internal CSS.

3. Inline CSS.

Q. Does PHP support multiple inheritances?

Ans.No, PHP support only single level of inheritance. A class can be inherited from a single class using keyword ‘extended’.

Q. What is the difference between echo and print?

Ans.Initially both look same because both used to

display any value. Main difference between echo and print is that echo

is just used to display any string in output. It will display whatever

is passed to it but on other hand print is a function itself it not only

display any value but also can return value.

Q. What is the difference between GET and POST method?

Ans.Whenever we fill any form on internet we can

used one from two methods to send data on sever computer, that method

can be either GET or POST. When we use the GET method all information is

displayed on address bar. If can sent up to 1024 of data using GET

method so it is good to use only when we are working with small scale

applications and data is not that much sensitive. If we talk about POST

method, No information will be displayed on address bar and we can send

up to 2 mb of data using POST method. This limit can also extend further

if required. PHP includes many CMS systems which can be used to handle the web content in a effective way.

Q.What functions are used to get the image size, Width and Height?

Ans.getimagesize () to get the size of an image

Imagesx () to get width of an image

Imagesy () to get height of  an image.

Q. What is PEAR in PHP?

Ans.PEAR stands for “PHP Extension and Application

Repository”. PEAR provides an inbuilt library of open source code for

PHP developers. It provides support for package maintains and code

distribution.

Q. How do you upload videos using PHP & MySQL?

Ans.We just need to copy the path of stored videos

in the database rather than storing the videos files itself. All videos

will be saved on a different folder and videos can be called from that

folder when ever required. Default size is 2 mb for video files but we

can change that size from max_file size option in php.ini file.

Q. What are the different types of errors in PHP?

Ans.There are three types of errors encountered in PHP.

1. Notice: These are very normal and non-critical

errors and they even not displayed to users. For examples accessing a

variable that not existed at all.

2. Warning: These are little bit critical errors.

These results are displayed to users but do not affect the output of

code. For example trying to include any file that is not exists.

3. Fatal errors: These are really critical errors. For example calling any non existence class.

Q. How constants are defined in a PHP script?

Ans.Define () is used to define constants in PHP.

define (“Newconstant”, 30);

Q. How can we submit a form without using submit button?

Ans.We can use the hyper links to submit a form if

we don’t want to use submit button. We have to use some java script code

for that.

Submit Me

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值