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





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





Inheritance in class diagrams is depicted by..





Which of the following are useful for method overloading?





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






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





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





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





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





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





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





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 function is used to transform PHP’s session-handler behavior into that defined by your custom handler?





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





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





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





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





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





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





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





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





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





Variables/functions in PHP don't work directly with





What is the description of Error level E_ERROR?





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





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





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





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





Select the incorrect statement about PHP programming language





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





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





Which function effectively deletes all sessions that have expired?





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





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





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





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?





Since which version of PHP was the directive max_file_limit available.





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





Which of the following multithreaded servers allow PHP as a plug-in?





Atleast how many abstract methods must an abstract class contain?





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





Which one of the following function is used to retrieve the MX records for the domain specified by hostname?





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





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





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






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





Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?





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



Which one of the following method is invoked when an undefined method is called by client code?





What does SPL stand for?





How would you start a session?





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





How many times can you define __autoload in a process?





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





Which keyword can be used to fix the above error?





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





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





Which directive determines how the session information will be stored?





What is the default value of max_input_time directive?





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






How many configuration directives pertinent to PHP’s mail function are available?





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






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





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?



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





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





Which one of the following statements can be used to establish port 80 connection with





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





How many ways can a session data be stored?





Which version of PHP introduced Try/catch Exception?





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





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





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





How many predefined exceptions does SPL provide access to?





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





If the diamond is filled it depicts which relationship?





What is the default port number of HTTP’s?





Which of the following is not a predefined constant?






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





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





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





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





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




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





Which version introduced the function error_get_last()?





Which of the following variable declarations within a class is invalid in PHP5?





How many error levels are available in PHP?





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 directive should we disable to obscure the fact that PHP is being used on our server?





UML stands for?





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





Which datatypes are treaded as arrays





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





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





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





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





__clone() is run on the ___ object.





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





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