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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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 statements is used to add an attachment to the mail?

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

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

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

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

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

Which one of the following methods recuperates any memory consumed by a result set?

  

  

  

  

What is the description of Error level E_ERROR?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Can joins be nested?

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The inbuilt function to get the number of parameters passed is

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

Polymorphism is also know as…

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one among the following means tight coupling ?

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

__clone() is run on the ___ object.

  

  

  

  

How many types of filtering are present in PHP?

  

  

  

  

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

  

  

  

  

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

  

  

In PHP language PEAR stands for

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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 functions can be used to concatenate array elements to form a single delimited string?

  

  

  

  

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

  

  

  

  

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 function is used to remove all HTML tags from a string passed to a form?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 of the following is a correct declaration?

  

  

  

  

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

  

  

  

  

+ is the visibility code for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

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

  

  

  

  

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 directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

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

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How would you start a session?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

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

  

  

  

  

There are three different kind of arrays:

  

  

  

  

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 function is used to send a e-mail using PHP script?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The filesize() function returns the file size in ___.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

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

  

  

  

  

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 preg PHP functions is used to take a string, and put it in an array?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The session_start() function must appear..

  

  

  

  

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

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

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

  

  

  

  

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.