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 statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

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 DBMSs do not have a native PHP extension?

  

  

  

  

  

Multiple select/load is possible with

  

  

  

  

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

  

  

  

  

__clone() is run on the ___ object.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Polymorphism is also know as…

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

In PHP in order to access MySQL database you will use:

  

  

  

  

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

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

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

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

Which of the following type cast is not correct?

  

  

  

  

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

  

  

  

  

Which version introduced the function error_get_last()?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 Apache directive outputs Apache’s server version, server name, port and compile-in modules?

  

  

  

  

# is the visibility code for?

  

  

  

  

Which keyword can be used to fix the above error?

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

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

  

  

  

  

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 of the following multithreaded servers allow PHP as a plug-in?

  

  

  

  

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

  

  

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

  

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?

  

  

A package is a set of related ___.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

You need to count the number of parameters given in the URL by a POST operation. The correct way is:

  

  

  

  

Since which version of PHP was the directive max_file_limit available.

  

  

  

  

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 relationship is illustrated by a line that begins with an unfilled diamond?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

Can joins be nested?

  

  

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

  

  

  

  

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

  

  

  

  

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  

  

  

  

  

  

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

  

  

Which of the following is a PHP resource?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

Which directive determines whether PHP scripts on the server can accept file uploads?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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 function was introduced to help automate the inclusion of class files?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The session_start() function must appear..

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

  

  

Does PHP 5 support exceptions?

  

  

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

  

  

  

  

How many ways can a session data be stored?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

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.