Advance PHP MCQ | Savitribai Public University Advance PHP MCQ | SPPU Advance PHP MCQ

Advance PHP

 

PHP

Chapter 1 : Introduction to Object oriented Programming in PHP


1. Which notation is used to access variables of an object?

A) ::

B) =

C) ->

D) .

Answer: C) ->

 

2. Which notation should be used to refer to a method in the context of a class rather than an object you use?

A) ->

B) _

C) $

D) ::

Answer: D) ::

 

3. Which one of the following property scope is not supported by PHP?

A) _collect()

B) _garbage()

C) _destruct()

D) _destructor()

Answer: C) _destruct()

 

4. Which of the following property scopes is not supported by PHP?

A) friendly()

B) final

C) public

D) static

Answer: A) friendly()

 

5. Which function is used to check if class exists or not?

A) exist()

B) exist_class()

C) class_exists()

D) _exist()

Answer: C) class_exists()

 

6. Which keyword is used to refer to properties or methods within the class itself?

A) Private

B) public

C) protected

D) $this

Answer: D) $this

 

7. Object area also Known as ____

A) reference

B) class

C) instance

D) template

Answer: C) instance

 

8. A member function typically accesses member of _____ object only.

A) current

B) next

C) previous

D) all of the above

Answer: A) current

 

9. The practice of separating the user from the true inner workings of an application through well-known interfaces is known as ____.

A) Polymorphism

B) Inheritance

C) Encapsulation

D) Dynamic Message passing

Answer: C) Encapsulation

 

10. PHP recognizes constructor by the name______

A) classname()

B) __construct

C) function_construct()

D) function__consturct()

Answer: D) function__consturct()

 

11. Which one of the following can be used to instantiate an object in PHP assuming class name to be Foo?

A) $obj = new $foo;

B) obj = new foo;

C) $obj = new foo();

D) obj = newfoo();

Answer: C) $obj = new foo();

 

12. Which one of the following is the right way to invoke a method?

A) $object-> methhodName();

B) object->methodName();

C) object->methodName;

D) $object->methodName;

Answer: A) $object-> methhodName();

 

Chapter 2 : Web Techniques

 

1. Which of the following PHP variables are used to process form data?

A) $_GET & $_PUT

B) $_GET & $_POST

C) $_SET & $_GET

D) READ & WRITE

Answer: B) $_GET & $_POST

 

2. When $_GET variable is used to collect form data, the data is visible_____

A) to nobody

B) to only one user

C) to root user

D) to everyone

Answer: D) to everyone

 

3. How many predefined variables are used in php to authenticate use?

A) 3

B) 4

C) 2

D) 1

Answer: C) 2

 

4. Which of the following PHP variables are use for authentication?

i) $_SERVER[‘PHP_AUTH_USER’];

ii) $_SERVER[‘PHP_AUTH_ROOT’];

iii) $_SERVER[‘PHP_AUTH_PWD’];

iv) $_SERVER[‘PHP_AUTH_PW’];

A) i and ii

B) i and iii

C) i and iv

D) ii and iii

Answer: C) i and iv

 

5. Which of the following PHP function is used for authentication?

A) inspect()

B) intersect()

C) header()

D) footer()

Answer: C) header()

 

6. Which of the following should not be used while sending crucial information?

A) $_POST

B) $_GET

C) $_PROCESS

D) $_ISSET

Answer: B) $_GET

 

7.Which of the following is not $_SERVER parameter?

A) SERVER_INFO

B) PHP_SERVER

C) SERVER_NAME

D) SERVER_PORT

Answer: B) PHP_SERVER

 

8. Which is true about $_PHP_SELF?

A) It passes PHP form information to next page.

B) It stores web page information.

C) It is used to debug page.

D) It is used to pass page information to itself.

Answer: D) It is used to pass page information to itself.

 

9. What is correct statement about sticky form?

A) It is simply HTML form that remember data how you filled it.

B) It is used to submit data to another page.

C) It is used to pass data to server.

D) None of above.

Answer: A) It is simply HTML form that remember data how you filled it.

 

10. What is use of $isset() function?

A) It is used to check whether variable is set or not.

B) It is used to set Variable.

C) It is used to set new value.

D) All of above.

Answer: A) It is used to check whether variable is set or not.

 

 

Chapter 3 : XML


1. XML stands for ____.

A) Extension modern link

B) extensible markup language

C) extra modern language

D) x-markup language

Answer: B) extensible markup language

 

2. Which of the following is correct statement?

A) All XML elements must have closing tag.

B) All XML documents must have DTD.

C) All XML documents must be in lowercase

D) XML opening tag should be in uppercase.

Answer: A) All XML elements must have closing tag.

 

3. XML comments are written as_____.

A) <!-!>

B) <!---?

C) <?-?>

D) <$----%>

Answer: B) <!---?

 

4. XML is designed to ___ and store data.

A) <?xml version=”1.0”?>

B) <$xml version=1.2”>

C) <xml version=”1.0”>

D) None of above

Answer: A) <?xml version=”1.0”?>

 

5. XML is designed to ____and store data.

A) design

B) verify

C) transport

D) none of above

Answer: C) transport

 

6. Well formed XML document means____.

A) It contains a root element.

B) It contains an element.

C) It contains one or more elements.

D) Must contain one or more elements and root elements must contain all other elements.

Answer: D) Must contain one or more elements and root elements must contain all other elements.

 

7. DTD means?

A) Data Type Definition.

B) Data Text Decode.

C) Define Text Data.

D) None of above.

Answer: A) Data Type Definition.

 

8. XML DOM object is ___.

A) Entity

B) Entity Reference

C) Comment Reference

D) Comment Data

Answer: B) Entity Reference

 

9. XML is case sensitive language.

A) true

B) false

C) can’t say

Answer: A) true

 

10. Which of the following is XML Parser?

A) SAX parser

B) DOM Parser

C) CDATA Parser

D)  (a) and (b)

Answer: D)  (a) and (b)

 

Chapter 4 : Ajax with PHP

 

1. What are all the technologies used by AJAX?

A) JavaScript

B) XMLHttpRequest

C) Document Object Model(DOM)

D) Cascading Style Sheets(CSS)

E) All of the above

Answer: E) All of the above

 

2. How can you find out that an AJAX request has been completed?

A) readyState=4

B) readyState=3

C) readyState=1

D) readyState=2

Answer: A) readyState=4

 

3. What are all the browsers support AJAX?

A) Internet Explorer 5.0 and above

B)  Opera 7.6 and above

C)  Netscape 7.1 and above

D)  Safari 1.2 and above

E) All of the above

Answer: E) All of the above

 

4. What is the name of object used for AJAX request?

A) XmlHttpRequest

B) XMLHttpRequest

C) XMLHTTPRequest

D) xmlhttprequest

Answer: B) XMLHttpRequest

 

5. What is the difference between synchronous and asynchronous requests?

A) Synchronous request blocks the user until a response is retrieved whereas asynchronous doesn’t block the user.

B) Asynchronous request blocks the user until a response is retrieved whereas synchronous doesn’t block the user.

C) Both are same

D) None of the above

Answer: A) Synchronous request blocks the user until a response is retrieved whereas asynchronous doesn’t block the user.

 

6. What are the properties of XMLHttprequest?

A) onReadyStateChange- It is called whenever readystate attribute changes.

B) readyState- It represents the state of the request.

C) responeText-It returns response as text.

D) responseXML – It returns response as XML.

E) All of the above.

Answer: E) All of the above.

 

7. AJAX Stand for______.

A) Abstract JSON And XML

B) Another Java Abstraction for X-Windows

C) Another Java and XML Library

D) Asynchronous JavaScript and XML

Answer: D) Asynchronous JavaScript and XML

 

8. The XMLHttpRequest object is used to exchange data with a server.

A) True

B) False

Answer: A) True

 

9. What will be the primary step when you have to send a request using JavaScript to a server?

A) You will call the connect() method of the XMLHttp Object.

B) You will call the execute() method of the XMLHttp Object.

C) You will call the open() method of the XMLHttp object.

D) None of the above.

Answer: C) You will call the open() method of the XMLHttp object.

 

10. The response Text property returns the response as a string format

A) True

B) False

Answer: A) True

 

Chapter 5 : Introduction to Web Services


1. Web services can be discovered using______

A) UDDII

B) UDDI

C) UDDDI

D) UDII

Answer: B) UDDI

 

2. What is RPC?

A) Regional Procedure calls

B) Registered procedure counselor

C) Remote Procedure Calls

D) Regional protection control

Answer: C) Remote Procedure Calls

 

3. What is WSDL?

A) Web Services Detail Language

B) Web Services Description Language

C) Web Services Development Language

D) Web System Description Language

Answer: B) Web Services Description Language

 

4. What is NOT a part of a SOAP Message?

A) SOAP Body

B) SOAP Header

C) SOAP Envelope

D) SOAP footer

Answer: D) SOAP footer

 

5. Which technologies are involved in web services?

A) SOAP

B) WSDL

C) HTTP

D) XML

E) All of the above       

Answer: E) All of the above

 

6.The basic Web Services platform is combination of ______ and ____

A) CSS and JAVA

B) CSS and HTTP

C) XML and HTML

D) XML and HTTP

Answer: D) XML and HTTP

 

7. _____ is the basis for Web services.

A) PHP

B) CSS

C) CGI

D) XML

Answer: D) XML

 

8. Which of the following is correct about SOAP?

A) SOAP is an XML-based protocol for exchanging information between computers.

B) SOAP is a communication protocol

C) SOAP is for communication between application

D) All of the above

Answer: D) All of the above

 

9. Which of the following component of Web service describes interfaces to web services?

A) UDDI

B) WSDL

C) SOAP

D)  None of the above.

Answer: A) UDDI

 

10. What SOAP STANDS for?

A) State Access Object Protocol

B) State Allied Object Protocol

C) Simple Access Object Protocol

D) Simple Allied Object Protocol

Answer: C) Simple Access Object Protocol

 

Chapter 6 : PHP Framework (Joomla/Drupal)


1.____ is an application design pattern that separates the application data and business logic from the presentation.

A) CMS

B) MVS

C) Framework

D) PHP

Answer: B) MVS

 

2. In Joomla _____ provide the flexibility to the administrator to select the default template as well as provide editing options for both the main index file of the template and the style sheet file.

A) Template Manger

B) Article Manager

C) Module Manager

D) Language Manager

Answer: A) Template Manger

 

3.The ______ helps the user to mange and administer a multilingual site.

A) Category Manager

B) Language Manager

C) Section Manger

D) FrontPage Manager

Answer: B) Language Manager

 

4. The control panel is a centralized panel where the administrator can jump to the most

A) Menus

B) Articles

C) Control Panel

D) Modules

Answer: A) Menus

 

5. A template controls the _______ of a site.

A) settings

B) Layout

C) Various Mangers

D) None

Answer: C) Various Mangers

 

6. CSS is _____.

A) Custom Style Sheet

B)  Cascading Simple Sheet

C) Cascading Style Sheet

D) Category Style Sheet

Answer: D) Category Style Sheet

 

7. Components can also be termed as_______.

A) Simple Application

B) Mini Application

C) Complex Application

D) None

Answer: A) Simple Application

 

8. Articles can also be termed as_____.

A) Documentation

B) Book

C) Short Stories

D) None

Answer: B) Book

 

9. For effective and easy navigation._______ provide links to various web pages.

A) Menus

B) Articles

C) Modules

D) Templates

Answer: A) Menus

 

10. A sites appearance and presentation can be controlled by _____.

A) Themes

B) Components

C) Menus

D) Modules

Answer: D) Modules

Advance PHP MCQ | Savitribai Public University Advance PHP MCQ | SPPU Advance PHP MCQ Advance PHP  MCQ | Savitribai Public University Advance PHP  MCQ  | SPPU Advance PHP MCQ Reviewed by technical_saurabh on June 26, 2021 Rating: 5
Powered by Blogger.