Development - Php Test

Test Instructions :

1. The Test is 1hr duration.
2. The Test Paper consists of 30 questions. The maximum marks are 30.
3. All the questions are multiple choice question type with three options for each question.
4. Out of the three options given for each question, only one option is the correct answer.
5. Each question is allotted 1 mark for each correct response.
6. 0.25 will be deducted for incorrect response of each question.
Start Test

   Time Left : 00 : 30    : 00

We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */

  

  

  

  

Which one of the following statements is true for include_once() and require_once()?

  

  

  

  

Which Apache directive outputs Apache’s server version, server name, port and compile-in modules?

  

  

  

  

The date() function returns ___ representation of the current date and/or time.

  

  

  

  

Which of the below statements is equivalent to $add += $add ?

  

  

  

  

Which of the following variables does PHP use to authenticate a user? i) $_SERVER['PHP_AUTH_USER'] ii) $_SERVER['PHP_AUTH_USERS'] iii) $_SERVER['PHP_AUTH_PU'] iv) $_SERVER['PHP_AUTH_PW']

  

  

  

  

Which one of the following preg PHP function is used to do a find and replace on a string or an array?

  

  

  

  

Which one of the following function is used to return an array consisting of various DNS resource records pertinent to a specific domain?

  

  

  

  

Which one of the following does not describe a validating filter?

  

  

  

  

What does SPL stand for?

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

There are three different kind of arrays:

  

  

  

  

What array will you get if you convert an object to an array?

  

  

  

  

What will happen at the end of the following sequence of SQL commands?   BEGIN TRANSACTION DELETE FROM MYTABLE WHERE ID=1 DELETE FROM OTHERTABLE ROLLBACK TRANSACTION  

  

  

  

  

  

Which of the following is a single global function defined in the jQuery library?

  

  

  

  

In PHP programming literal is a

  

  

  

  

Which directive determines which degree of server details is provided if the ServerSignature directive is enabled?

  

  

  

  

When you’re uploading files you need to set the enctype of the form to ___.

  

  

  

  

How would you store order number (34) in an 'OrderCookie'?

  

  

  

  

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

  

  

  

  

PHP provides built-in interceptor methods, which can intercept messages sent to undefined methods and properties. This is also known as ___.

  

  

  

  

Which one of the following method is invoked when an undefined method is called by client code?

  

  

  

  

In PHP in order to access MySQL database you will use:

  

  

  

  

___ code makes change easier because the impact of altering an implementation will be localized to the component being altered.

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

Which keyword can be used to fix the above error?

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

Which one of the following preg PHP functions is used to take a string, and put it in an array?

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

The memory_limit is only applicable if ___ is enabled when you configure PHP. Fill in the blank.

  

  

  

  

Which function is responsible for sending a custom message to the system log?

  

  

  

  

Which class accepts a class name or an object reference and returns an array of interface name?

  

  

  

  

The ........... function is used to read a single character from a file.

  

  

  

  

The ftp_mkdir() function creates a directory on the FTP server.

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

Which one of the following statements is true about sequence diagrams?

  

  

  

  

UML stands for?

  

  

  

  

Which one of the following statements is used to create a table?

  

  

  

  

Which of the following is/are not an exception? i) BadFunctionCallException ii) BadMethodCallException iii) LogicException iv) DomainException

  

  

  

  

Which of the following is/are an exception? i) OutOfBoundException ii) OutOfRangeException iii) OverflowException iv) UnderflowException

  

  

  

  

Which of the following operations cannot be performed using the standard ftp:// stream wrapper? 

  

  

  

  

The windows version of PHP has built-in support for the FTP extension

  

  

You are using sessions and session_register() to register objects. These objects are serialized automatically at the end of each PHP page and are de-serialized automatically on each of the following pages. Is this true or false?

  

  

Which function is used to remove all HTML tags from a string passed to a form?

  

  

  

  

Which method scope prevents a method from being overridden by a subclass?

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

When a user confirms that he wishes to delete an entry, that entry’s URL is passed to a function which removes the entry from the ___.

  

  

  

  

Multiple select/load is possible with

  

  

  

  

Which one of the following should not be used while sending passwords or other sensitive information?

  

  

  

  

Say we have two compare two strings which of the following function/functions can you use? i) strcmp() ii) strcasecmp() iii) strspn() iv) strcspn()

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

Which of the following variable declarations within a class is invalid in PHP5?

  

  

  

  

which of the following pair have non-associative equal precedence?

  

  

  

What is the description of Error level E_ERROR?

  

  

  

  

Which one of the following statements should be used to disable just the fopen(), and file() functions?

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

Which one of the following statements is true for require() and require_once()?

  

  

  

  

Which one of the following function should I use to find the parent class of a class?

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

Which one of the following methods recuperates any memory consumed by a result set?

  

  

  

  

Which version of PHP introduced Try/catch Exception?

  

  

  

  

Which one of the following functions can be used to concatenate array elements to form a single delimited string?

  

  

  

  

When dealing with timeout values in sockets, the connection timeout can be changed independently of the read/write time out. Which function must be used for this purpose?

  

  

  

  

Which of the following PHP function is commonly used when handling authentication via PHP? i) header() ii) footer() iii) inset() iv) isset()

  

  

  

  

Which of the following DBMSs do not have a native PHP extension?

  

  

  

  

  

Which one of the following is the default PHP session name?

  

  

  

  

___ are used in class diagrams to describe the way in which specific elements should be used.

  

  

  

  

Study following steps and determine the correct order (1) Open a connection to MySql server (2) Execute the SQL query (3) Fetch the data from query (4) Select database (5) Close Connection

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

___ occurs when discrete parts of a system’s code are tightly bound up with one another so that a change in one part necessitates changes in the others.

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

The developers of PHP deprecated the safe mode feature as of which PHP version.

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page

  

  

  

  

You need to count the number of parameters given in the URL by a POST operation. The correct way is:

  

  

  

  

Which keyword must be added before $first variable on the third line of the above question to make $second and $first as distinct objects in PHP 5?

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

The FTP functions are used to ....... files from file servers.

  

  

  

  

  

Which one of the following is the correct way of declaring a namespace?

  

  

  

  

Placing a static method for generating ___ objects in the ___ class is convenient.

  

  

  

  

What will be the output of the following code? echo 30*5 . 7;

  

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

  

  

  

  

Which one of the following will you use to check the class of an object?

  

  

  

  

Which one of the following keyword is used in conjunction with an Exception object?

  

  

  

  

Which one of the following statements can be used to select the database?

  

  

  

  

Which one of the following is displayed below the class name in the class diagrams?

  

  

  

  

Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

In a class diagram the class is divided into three sections, what is displayed in the first section?

  

  

  

  

The ............. statement is used to delete a table.

  

  

  

  

Which function is used to erase all session variables stored in the current session?

  

  

  

  

Which one of the following filter checks if variable of specified type exists?

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

___ occurs when discrete parts of a system’s code are tightly bound up with one another so that a change in one part necessitates changes in the others.

  

  

  

  

Note:
  • Click the 'Submit Test' button given in the bottom of this page to Submit your answers.
  • Test will be submitted automatically if the time expired.
  • Don't refresh the page.