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 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 statements is true about sequence diagrams?

  

  

  

  

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

  

  

  

  

Since which version of PHP was the directive max_file_limit available.

  

  

  

  

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

  

  

  

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

  

  

  

  

If the directive session.cookie_lifetime is set to 3600, the cookie will live until..

  

  

  

  

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

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which symbol is used to declare nested namespaces?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The extent to which proximate procedures are related to one another is known as…

  

  

  

  

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

  

  

  

  

How many ways can a session data be stored?

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which keyword can be used to fix the above error?

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

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

  

  

  

  

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  

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following function is used to send a e-mail using PHP script?

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

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?

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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 will be the output of the following code? echo 30*5 . 7;

  

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

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

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

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 among the following means tight coupling ?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

PHP does not have an built in support for which one of the following ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Can joins be nested?

  

  

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

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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 is the default PHP session name?

  

  

  

  

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 of the following is used to maintain the value of a variable over different pages?

  

  

  

  

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

  

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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 conditional statements is/are supported by PHP? i) if statements ii) if-else statements iii) if-elseif statements iv) switch statements

  

  

  

  

In PHP programming literal is a

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

What does SPL stand for?

  

  

  

  

You use the get_class_methods() function to return the names of all the methods in the class. Which function will you use to print it on the screen?

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

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

  

  

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

  

  

  

  

UML stands for?

  

  

  

  

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

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 of the following variable declarations within a class is invalid in PHP5?

  

  

  

  

The session_start() function must appear..

  

  

  

  

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.