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

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

In PHP programming literal is a

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many times can you define __autoload in a process?

  

  

  

  

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 is a single global function defined in the jQuery library?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 methods in the exception class, is used to get a nested exception object?

  

  

  

  

The session_start() function must appear..

  

  

  

  

Polymorphism is also know as…

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

  

Atleast how many abstract methods must an abstract class contain?

  

  

  

  

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

  

  

  

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

  

  

  

  

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

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version of PHP introduced Try/catch Exception?

  

  

  

  

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

  

  

  

  

How many ways can a session data be stored?

  

  

  

  

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

  

  

  

  

Which function effectively deletes all sessions that have expired?

  

  

  

  

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  

  

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many predefined exceptions does SPL provide access to?

  

  

  

  

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

  

  

  

  

Which class name is reserveed in PHP ?

  

  

  

  

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

  

  

  

  

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 functions can be used to concatenate array elements to form a single delimited string?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?

  

  

  

  

+ is the visibility code for?

  

  

  

  

What is the default value of max_input_time directive?

  

  

  

  

Which of the following functions do not return a timestamp? 

  

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How would you start a session?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which symbol is used to declare nested namespaces?

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

What is the description of Error level E_ERROR?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Before you can start processing images with PHP, you must first add the ability to upload images to your administrative form on ___.

  

  

  

  

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

  

  

  

  

Which version introduced the function error_get_last()?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

UML stands for?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

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 one of the following is the default PHP session name?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

In PHP language PEAR stands for

  

  

  

  

The ........... function is used to read a single character from 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 of the below statements is equivalent to $add += $add ?

  

  

  

  

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

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

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.