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

What does SPL stand for?

  

  

  

  

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

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

UML stands for?

  

  

  

  

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

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

If you call a method and it doesn’t exist it’ll cause a problem. To check the method which function will you use?

  

  

  

  

Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?

  

  

  

  

  

Which of the following is/are an external data? i) Cookies ii) Input data from a form iii) Server Variables iv) Web services data

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

Which function effectively deletes all sessions that have expired?

  

  

  

  

A PHP script should start with ___ and end with ___:

  

  

  

  

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

  

  

  

  

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

  

  

  

  

+ is the visibility code for?

  

  

  

  

Which one of the following is displayed in the third section of the class diagram?

  

  

  

  

Which function displays the web page’s most recent modification date?

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

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 one of the following methods in the exception class, is used to get a nested exception object?

  

  

  

  

___ 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.

  

  

  

  

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

  

  

  

  

In mail($param2, $param2, $param3, $param4), the $param2 contains:

  

  

  

  

Which of the conditional statements is/are supported by PHP? i) if statements ii) if-else statements iii) if-elseif statements iv) switch statements

  

  

  

  

What is the difference between stat() and fstat()?

  

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

Which of the following multithreaded servers allow PHP as a plug-in?

  

  

  

  

Which of the following are correct ways of creating an array? i) state[0] = “karnataka”; ii) $state[] = array(“karnataka”); iii) $state[0] = “karnataka”; iv) $state = array(“karnataka”);

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

Which one of the following statements should you use to set the session username to Nachi?

  

  

  

  

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

  

  

  

  

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 ___.

  

  

  

  

Which one of the following filter is used to filter several variables with the same or different filters?

  

  

  

  

Which one of the following statements can be used to establish port 80 connection with www.google.com?

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is a PHP resource?

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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

  

  

  

  

Which of the following statements is used to add an attachment to the mail?

  

  

  

  

Which keyword can be used to fix the above error?

  

  

  

  

You can extend the exception base class, but you cannot override any of the preceding methods because the are declared as..

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

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']

  

  

  

  

Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?

  

  

  

  

  

PHP 4 did not support instanceof. Instead, which function did it provide?

  

  

  

  

Which one of the following is the right description for the method getMessage() ?

  

  

  

  

Which one of the following databases has PHP supported almost since the beginning?

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

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

  

  

  

  

Which relationship is illustrated by a line that begins with an unfilled diamond?

  

  

  

  

If you want to temporarily store uploaded files in the /tmp/phpuploads/ directory, which one of the following statement will you use?

  

  

  

  

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

  

  

  

  

Which one of the following is know as the key to object-oriented programming ?

  

  

  

  

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

  

  

  

  

Which one of the following functions finds the last occurrence of a string, returning its numerical position?

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

Which method introduced in PHP 5, is invoked just before an object is garbage collected?

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

Which of the following is used to maintain the value of a variable over different pages?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following is the very first task executed by a session enabled page?

  

  

  

  

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

  

  

  

  

Which one of the following functions will convert a string to all uppercase?

  

  

  

  

The ftp_size() function returns the size of a specified file on the FTP server.

  

  

  

  

Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?

  

  

  

  

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

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

Which one of the following function returns the port number of a specified service?

  

  

  

  

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

  

  

  

  

What function can you use to create your own streams using the PHP stream wrappers and register them within PHP?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following statements should be used to disable the use of two classes administrator and janitor?

  

  

  

  

Which character do the error_reporting directive use to represent the logical operator NOT?

  

  

  

  

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

  

  

  

  

A package is a set of related ___.

  

  

  

  

__clone() is run on the ___ object.

  

  

  

  

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

  

  

  

  

Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ___.

  

  

  

  

During PHP installation which function creates a HTML page to display records how PHP was installed ?

  

  

  

  

Which two predefined variables are used to retrieve information from forms?

  

  

  

  

Which of the following statements is incorrect with regard to interfaces?

  

  

  

  

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

  

  

  

  

___ 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.

  

  

  

  

Which one of the following functions will you use to check that the class exists before you work with it?

  

  

  

  

Which directive should we disable to obscure the fact that PHP is being used on our server?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many times can you define __autoload in a process?

  

  

  

  

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

  

  

  

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

  

  

  

  

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

  

  

  

  

  

What is the difference between print() and echo()?

  

  

  

  

  

Which one among the following means tight coupling ?

  

  

  

  

Suppose all web material is located within the directory /home/www. To prevent users from viewing and manipulating files such as /etc/password, which one of the following statements should you use?

  

  

  

  

Multiple select/load is possible with

  

  

  

  

Which of the following PHP statements will output Hello World on the screen? i) echo (“Hello World”); ii) print (“Hello World”); iii) printf (“Hello World”); iv) sprintf (“Hello World”);

  

  

  

  

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.