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 session_start() function must appear..

  

  

  

  

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?

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

There are three different kind of arrays:

  

  

  

  

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 is know as the key to object-oriented programming ?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What is the default value of max_input_time directive?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

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

  

  

  

  

Which of the following is a PHP resource?

  

  

  

  

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

  

  

  

  

A bidirectional relationship in class diagrams is described by..

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 keyword is used to put a stop on inheritance?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

How many times can you define __autoload in a process?

  

  

  

  

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

  

  

  

  

What does SPL stand for?

  

  

  

  

Multiple select/load is possible with

  

  

  

  

Which one of the following functions will convert a string to all uppercase?

  

  

  

  

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

  

  

  

  

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 of the following are useful for method overloading?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

A package is a set of related ___.

  

  

  

  

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.

  

  

  

  

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

  

  

  

  

Which relationship is illustrated by a line that begins with an unfilled diamond?

  

  

  

  

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

  

  

  

  

How would you start a session?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Inheritance in class diagrams is depicted by..

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Polymorphism is also know 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.

  

  

  

  

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

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

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

  

  

  

  

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

  

  

  

  

__clone() is run on the ___ object.

  

  

  

  

Select the incorrect statement about PHP programming language

  

  

  

  

What function can you use to create your own streams using the PHP stream wrappers and register them within PHP?

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 one of the following functions will you use to check that the class exists before you work with it?

  

  

  

  

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

  

  

  

  

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

  

  

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

  

  

  

  

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 of the following can you place inside a namespace?

  

  

  

  

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

  

  

  

  

The inbuilt function to get the number of parameters passed is

  

  

  

  

In PHP programming literal is a

  

  

  

  

Which of the below statements is equivalent to $add += $add ?

  

  

  

  

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

  

  

  

  

Atleast how many abstract methods must an abstract class contain?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which version of PHP introduced Try/catch Exception?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following functions do not return a timestamp? 

  

  

  

  

  

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.