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

__clone() is run on the ___ object.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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”);

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

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

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version introduced the function error_get_last()?

  

  

  

  

___ 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 following PHP function is commonly used when handling authentication via PHP? i) header() ii) footer() iii) inset() iv) isset()

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which function effectively deletes all sessions that have expired?

  

  

  

  

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

  

  

  

  

What functions count elements in 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 of the following is/are an exception? i) OutOfBoundException ii) OutOfRangeException iii) OverflowException iv) UnderflowException

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What does SPL stand for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many configuration directives pertinent to PHP’s mail function are available?

  

  

  

  

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

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Since which version of PHP was the directive max_file_limit available.

  

  

  

  

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

  

  

  

  

To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?

  

  

  

  

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

  

  

  

  

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”);

  

  

  

  

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 databases has PHP supported almost since the beginning?

  

  

  

  

# is the visibility code for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What will be the output if we replace the line $num = preg_grep(“/[0-5]/”, $number); with $num = preg_grep(“/[0-5]/”, $number, PREG_GREP_INVERT);?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

Which directive determines whether PHP scripts on the server can accept file uploads?

  

  

  

  

Say I want to change the extension of a PHP file, which of the following statements should I edit to change from .php to .html in the httpd.conf file?

  

  

  

  

Does PHP 5 support exceptions?

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following function checks for the existence of DNS records?

  

  

  

  

Which of the following printing construct/function accpets multiple parameters?

  

  

  

  

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

  

  

  

  

What is the description of Error level E_ERROR?

  

  

  

  

___ 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 is used to search a string?

  

  

  

  

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?

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

A package is a set of related ___.

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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.