Php Interview Objective Question Answer

12
PHP Interview Question Answer http://www .Interview.shiksha360.com Opportunity to Work on Real Time Project Online Interview Question-Answer Technical, HR Interview tips Online Skill Test JOB Update Join Shiksha360 Training cum Placement Program Call Now: 0522-6051257 Lucknow & 0120-6401257 Noida Shiksha360. a unit of Glocal Technologies Pvt. Ltd. /shiksha360 /+shiksha360

Transcript of Php Interview Objective Question Answer

Page 1: Php Interview Objective Question Answer

PHP Interview Question Answer

http://www.Interview.shiksha360.com

• Opportunity to Work on Real Time Project

• Online Interview Question-Answer

• Technical, HR Interview tips

• Online Skill Test

• JOB Update

Join Shiksha360Training cum Placement ProgramCall Now: 0522-6051257 Lucknow & 0120-6401257 Noida

Shiksha360. a unit of Glocal Technologies Pvt. Ltd. /shiksha360 /+shiksha360

Page 2: Php Interview Objective Question Answer

http://interview.shiksha360.com

A) Personal Home Pages B) Private Home Page

C) Personal Hypertext Processor D) Hypertext Pre-processor

Ans : D) Hypertext Pre-processor

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 1: What does PHP stand for?

Ques 2 : Which one of the following property scopes is not supported by PHP?

A) friendly B) final C) public D) static

Ans : A) friendly

Page 3: Php Interview Objective Question Answer

http://interview.shiksha360.com

A) "Hello World"; B) echo "Hello World";

C) Document.Write("Hello World"); D) <script>"Hello World"</script>

Ans : B) echo”HelloWorld”;

Shik

sha3

60.c

om

Interview Question Answer

Ques 3: How do you write "Hello World" in PHP?

Ques 4 : All variables in PHP start with which symbol?

A) $ B) ! C) _ D) None

Ans : A) $

Page 4: Php Interview Objective Question Answer

http://interview.shiksha360.com

a) </php> b) New line

c) ; d) .

Ans : C) ;

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 5: What is the correct way to end a PHP statement?

Ques 6 : In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:

A) True B) False

Ans : A) True

Page 5: Php Interview Objective Question Answer

http://interview.shiksha360.com

A) createmy Function() B) new functionmyFunction()

C) functionmyFunction() D) None of these

Ans : C) functionmyFunction()

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 7: What is the correct way to create a function in PHP?

Ques 8 : Include files must have the file extension ".inc"

A) True B) False

Ans : A) True

Page 6: Php Interview Objective Question Answer

http://interview.shiksha360.com

A) fopen("time.txt","r"); B) open("time.txt");

C) fopen("time.txt","r+"); D) open("time.txt","read");

Ans : A) fopen("time.txt","r");

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 9: What is the correct way to open the file "time.txt" as readable?

Ques 10 : PHP allows you to send emails directly from a script

A) True B) False

Ans : A) True

Page 7: Php Interview Objective Question Answer

http://interview.shiksha360.com

A) dbopen("localhost"); B) mysql_open("localhost");

C) mysql_connect("localhost"); D) connect_mysql("localhost");

Ans : C) mysql_connect("localhost");

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 11: What is the correct way to connect to a MySQL database?

Ques 12 : PHP can be run on Microsoft Windows IIS(Internet Information Server):

A) True B) False

Ans : A) True

Page 8: Php Interview Objective Question Answer

http://interview.shiksha360.com

A) $my-Var B) $myVar

C) $my_Var D) None of these

Ans : A) $my-Var

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 13: Which one of these variables has an illegal name?

A) Server, Browser B) Server, Client

C) Server, Server D) None of these

Ans : A) Server, Browser

Ques 14: PHP code is executed on the __, and the plain HTML result is sent on to the__

Page 9: Php Interview Objective Question Answer

http://interview.shiksha360.com

a) strlength() b) str()

c) len() d) strlen()

Ans : D) strlen()

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 15: _______ function is used to return the length of string.

Ques 16: The ____ function is used to set a cookie.

a) getcookie() b) fetchcookie()

c) setcookie() d) setcokie()

Ans : c) setcookie()

Page 10: Php Interview Objective Question Answer

http://interview.shiksha360.com

a) No, because PHP is server-side, and JavaScript is client-side.

b) No, because PHP is a loosely typed language.

c) Yes, because JavaScript executes before PHP.

d) Yes, because PHP can generate valid JavaScript

Ans : D) Yes, because PHP can generate valid JavaScript

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 17: Is it possible to pass data from PHP to JavaScript?

Ques 18: Which types of form elements can be excluded from the HTTP request?

a) text, radio, and check box b) text, submit, and hidden

c) submit and hidden d) radio and check box

Ans : d) radio and check box

Page 11: Php Interview Objective Question Answer

http://interview.shiksha360.com

a) PHP 4 b) PHP 5

c) PHP 6 d) PHP 5.3

Ans : b) PHP 5

Shik

sha3

60.c

om

PHP Interview Question Answer

Ques 19: Which version of PHP introduced the instanceof keyword?

Ques 20: Which one of the following keyword is used inherit our subclass into a superclass?

a) extends b) implements

c) inherit d) include

Ans : A) extends

Page 12: Php Interview Objective Question Answer

http://interview.shiksha360.com

529A/708, Gulshan Enclave, KhurramNagar, Lucknow

Phone: 0522 6051257

0120-6401257

[email protected]

www.shiksha360.com

Shiksha360 : Contact us