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

The inbuilt function to get the number of parameters passed is

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many types of filtering are present in PHP?

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Does PHP 5 support exceptions?

  

  

The session_start() function must appear..

  

  

  

  

Polymorphism is also know as…

  

  

  

  

What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

  

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

  

  

  

  

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 ?

  

  

  

  

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 is not a preg PHP function?

  

  

  

  

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

  

  

  

  

In PHP programming literal is a

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

Which one of the following is the very first task executed by a session enabled page?

  

  

  

  

Which of the following is a PHP resource?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

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

  

  

Which version of PHP introduced Try/catch Exception?

  

  

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

What is the default value of max_input_time directive?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

Multiple select/load is possible with

  

  

  

  

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

  

  

  

  

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

  

  

  

  

To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

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

  

  

  

  

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 of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

# is the visibility code for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

Which version introduced the function error_get_last()?

  

  

  

  

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

  

  

  

  

Which one of the following keyword is used in conjunction with an Exception object?

  

  

  

  

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

  

  

  

  

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 datatypes are treaded as arrays

  

  

  

  

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 operations cannot be performed using the standard ftp:// stream wrapper? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following function is used to retrieve the MX records for the domain specified by hostname?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

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.