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

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

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

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

  

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

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

  

  

  

  

Which of the following PHP function is commonly used when handling authentication via PHP? i) header() ii) footer() iii) inset() iv) isset()

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 following is/are an external data? i) Cookies ii) Input data from a form iii) Server Variables iv) Web services data

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

+ is the visibility code for?

  

  

  

  

Polymorphism is also know as…

  

  

  

  

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?

  

  

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

  

  

  

  

__clone() is run on the ___ object.

  

  

  

  

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

  

  

  

  

The session_start() function must appear..

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

What does SPL stand for?

  

  

  

  

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

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

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

  

  

  

  

Which of the following functions do not return a timestamp? 

  

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 should not be used while sending passwords or other sensitive information?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following statements should be used to disable just the fopen(), and file() functions?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

Which one of the following databases has PHP supported almost since the beginning?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Can joins be nested?

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

Which one of the following statements can be used to establish port 80 connection with www.google.com?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which symbol is used to declare nested namespaces?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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 is not supported in PHP5?

  

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

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

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

What functions count elements in an array?

  

  

  

What is the description of Error level E_ERROR?

  

  

  

  

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.