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

Which function is used to transform PHP’s session-handler behavior into that defined by your custom handler?

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

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

  

  

  

  

Which one of the following will you use to check the class of an 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.

  

  

  

  

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

  

  

  

  

Object-oriented code tries to minimize dependencies by moving responsibility for handling tasks away from ___ and toward the objects in the system.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 method scope prevents a method from being overridden by a subclass?

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.

  

  

  

  

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

  

  

  

  

Since which version of PHP was the directive max_file_limit available.

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

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 multithreaded servers allow PHP as a plug-in?

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

Which keyword can be used to fix the above error?

  

  

  

  

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

  

  

  

  

Which of the following is a PHP resource?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which parameter determines whether the old session file will also be deleted when the session ID is regenerated?

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

Which one among the following means tight coupling ?

  

  

  

  

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

  

  

  

  

Which one of the following statements should be used to include a file?

  

  

  

  

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

  

  

  

  

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 one of the following methods recuperates any memory consumed by a result set?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following method is invoked when a value is assigned to an undefined property?

  

  

  

  

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

  

  

  

  

Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?

  

  

  

  

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

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

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

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

The URLs in the administrative links won’t mean anything to admin.php unless you modify ___.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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  

  

  

  

  

  

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

  

  

  

  

  

Which version introduced the function error_get_last()?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which function was introduced to help automate the inclusion of class files?

  

  

  

  

Which of the following functions do not return a timestamp? 

  

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

Which one of the following function is used to retrieve the MX records for the domain specified by hostname?

  

  

  

  

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 of the following is/are an external data? i) Cookies ii) Input data from a form iii) Server Variables iv) Web services data

  

  

  

  

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

  

  

  

  

Which one of the following is not a preg PHP function?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 one of the following function returns the port number of a specified service?

  

  

  

  

There are three different kind of arrays:

  

  

  

  

# is the visibility code for?

  

  

  

  

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

  

  

  

  

Which of the following network transports doesn’t PHP support?

  

  

  

  

  

How many types of filtering are present in PHP?

  

  

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

What is the description of Error level E_ERROR?

  

  

  

  

What does SPL stand for?

  

  

  

  

Which one of the following functions is used to search a string?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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.