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

What functions count elements in an array?

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is used to maintain the value of a variable over different pages?

  

  

  

  

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 directive determines whether PHP scripts on the server can accept file uploads?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

# is the visibility code for?

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

The inbuilt function to get the number of parameters passed is

  

  

  

  

PHP 4 did not support instanceof. Instead, which function did it provide?

  

  

  

  

What is the default value of max_input_time directive?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many ways can a session data be stored?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

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  

  

  

  

  

  

UML stands for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 class accepts a class name or an object reference and returns an array of interface name?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

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

  

  

  

  

There are three different kind of arrays:

  

  

  

  

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

  

  

  

  

Since which version of PHP was the directive max_file_limit available.

  

  

  

  

We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */

  

  

  

  

How would you start a session?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which function displays the web page’s most recent modification date?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

Atleast how many abstract methods must an abstract class contain?

  

  

  

  

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 are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

Which of the following is a PHP resource?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

  

  

  

  

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

  

  

  

  

Which two predefined variables are used to retrieve information from forms?

  

  

  

  

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

  

  

  

  

A package is a set of related ___.

  

  

  

  

In PHP programming literal is a

  

  

  

  

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

  

  

  

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

  

  

  

  

The session_start() function must appear..

  

  

  

  

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

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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.