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 functions do not return a timestamp? 

  

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

What does SPL stand for?

  

  

  

  

Polymorphism is also know as…

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

There are three different kind of arrays:

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which symbol is used to declare nested namespaces?

  

  

  

  

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

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

Multiple select/load is possible with

  

  

  

  

Which version of PHP introduced Try/catch Exception?

  

  

  

  

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 function checks for the existence of DNS records?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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?

  

  

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

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

Which function is used to transform PHP’s session-handler behavior into that defined by your custom handler?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 a PHP resource?

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

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

  

  

  

  

UML stands for?

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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 network transports doesn’t PHP support?

  

  

  

  

  

A package is a set of related ___.

  

  

  

  

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

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

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

  

  

  

  

Which of the following variable declarations within a class is invalid in PHP5?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which function effectively deletes all sessions that have expired?

  

  

  

  

# is the visibility code for?

  

  

  

  

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 function displays the web page’s most recent modification date?

  

  

  

  

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

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one among the following means tight coupling ?

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

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

  

  

  

  

  

What is the default value of max_input_time directive?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many ways can a session data be stored?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

The inbuilt function to get the number of parameters passed is

  

  

  

  

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

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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 function is used to retrieve the MX records for the domain specified by hostname?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 statements should be used to include a file?

  

  

  

  

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 statements is used to create a table?

  

  

  

  

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

  

  

  

  

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.