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

  

  

  

  

PHP files have a default file extension of..

  

  

  

  

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

  

  

  

  

Which of the following can you place inside a namespace?

  

  

  

  

Parameter flags was added in which version of PHP?

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

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

  

  

  

  

What is the default port number of HTTP’s?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

which of the following is a correct declaration?

  

  

  

  

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

  

  

  

  

Since which version of PHP was the directive max_file_limit available.

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many types of filtering are present in PHP?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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  

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which datatypes are treaded as arrays

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following functions do not return a timestamp? 

  

  

  

  

  

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

  

  

  

  

Which of the following are valid PHP stream transports? 

  

  

  

  

Which of the following DBMSs do not have a native PHP extension?

  

  

  

  

  

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

  

  

  

  

If the diamond is filled it depicts which relationship?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following filter is used to filter several variables with the same or different filters?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which method is invoked when an undefined property is accessed ?

  

  

  

  

How would you start a session?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which one of the following preg PHP functions is used to take a string, and put it in an array?

  

  

  

  

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

  

  

  

  

There are three different kind of arrays:

  

  

  

  

Which directive determines how the session information will be stored?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

What is the default value of max_input_time directive?

  

  

  

  

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

  

  

  

  

Which keyword is used to put a stop on inheritance?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following are useful for method overloading?

  

  

  

  

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

  

  

  

  

Polymorphism is also know as…

  

  

  

  

Which of the following is not a predefined constant?

  

  

  

  

  

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 filesize() function returns the file size in ___.

  

  

  

  

UML stands for?

  

  

  

  

Which of the following is not supported in PHP5?

  

  

  

  

  

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

  

  

  

  

Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

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

  

  

  

  

PHP recognizes constructors by the name..

  

  

  

  

Which version of PHP introduced E_STRICT Error level?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many error levels are available in PHP?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What functions count elements in an array?

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is Ternary Operator?

  

  

  

  

  

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

  

  

  

  

In PHP programming literal is a

  

  

  

  

Which one of the following functions will you use to check that the class exists before you work with it?

  

  

  

  

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

  

  

  

  

  

Variables/functions in PHP don't work directly with

  

  

  

  

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.