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 below statements is equivalent to $add += $add ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Atleast how many abstract methods must an abstract class contain?

  

  

  

  

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

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many times can you define __autoload in a process?

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

  

  

What will be the output if a protected method is given as argument to the function method_exist()?

  

  

  

  

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

  

  

  

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

  

  

  

  

# is the visibility code for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

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

  

  

  

  

Which version of PHP introduced Try/catch Exception?

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

Which of the following is a PHP resource?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 one of the following statements is true for include_once() and require_once()?

  

  

  

  

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 functions will you use to check that the class exists before you work with it?

  

  

  

  

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

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

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

  

  

Which symbol is used to declare nested namespaces?

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

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

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

___ 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 keyword is used in conjunction with an Exception object?

  

  

  

  

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

  

  

  

  

Which one of the following methods in the exception class, is used to get a nested exception object?

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

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

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Till which version of PHP, developers were forced to name their files in a global context?

  

  

  

  

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?

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Polymorphism is also know as…

  

  

  

  

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 one of the following statements is true about sequence diagrams?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

There are three different kind of arrays:

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

In PHP programming literal is a

  

  

  

  

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

  

  

  

  

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.