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 not an exception? i) BadFunctionCallException ii) BadMethodCallException iii) LogicException iv) DomainException

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

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 function effectively deletes all sessions that have expired?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What will be the output of the following code? echo 30*5 . 7;

  

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

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

  

  

  

  

The inbuilt function to get the number of parameters passed is

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

__clone() is run on the ___ object.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

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

  

  

  

  

The session_start() function must appear..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

There are three different kind of arrays:

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Atleast how many abstract methods must an abstract class contain?

  

  

  

  

Which version introduced the function error_get_last()?

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

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

  

  

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

  

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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 statements can be used to establish port 80 connection with www.google.com?

  

  

  

  

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

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

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

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

Can joins be nested?

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

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 two predefined variables are used to retrieve information from forms?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many times can you define __autoload in a process?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following statements is true about sequence diagrams?

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

The ......... function parses an English textual date or time into a Unix timestamp 

  

  

  

  

Which of the following functions do not return a timestamp? 

  

  

  

  

  

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

  

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

Which keyword must be added before $first variable on the third line of the above question to make $second and $first as distinct objects in PHP 5?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following is the correct way of declaring a namespace?

  

  

  

  

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 of the following pair have non-associative equal precedence?

  

  

  

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/are an exception? i) OutOfBoundException ii) OutOfRangeException iii) OverflowException iv) UnderflowException

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

Multiple select/load is possible with

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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.