Wednesday, 6 August 2014

Hello Friends...!!!

I am back with one more practice test for PHP DEVELOPER

Questions PHP, PHP practice test, interview Questions For PHP, Multiple choice questions

Questions For PHP Developers


1. Which one of the following is the right way of defining a function in PHP?

a) function { function body }
b) data type functionName(parameters) { function body }
c) functionName(parameters) { function body }
d) function fumctionName(parameters) { function body }

2) fgets() is used to read a file one line at a time

A) True
B) False

Que. 3 Which method is secured for securing data in PHP?

a) $_POST
b) $_GET
c) Both a & b
d) None of these

Que. 4 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
a. 1, 4, 2, 3, 5
b. 4, 1, 2, 3, 5
c. 1, 5, 4, 2, 1
d. 4, 1, 3, 2, 5

Que. 5 Variable scope on which a variable does not loose its value when the function exists and use that value if the function is called again is: 

a.  Local
b.  function parameter
c.  static
d.  None of above

Que. 6 What will be the output of the following PHP code ?

  1. <?php
  2. $a = 10;
  3. echo ++$a;
  4. echo $a++;
  5. echo $a;
  6. echo ++$a;
  7. ?>
a) 11111213
b) 11121213
c) 11111212
d) 11111112

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

a) __load()
b) __preload()
c) __autoload()
d) __inload()

Que. 8 What will be the output of the following PHP code ?

  1. <?php
  2. define("GREETING", "PHP is a scripting language");
  3. echo $GREETING;
  4. ?>
b) no output
c) PHP is a scripting language

Que. 9 If a boolean variable $ alive= 5; 

a. $ alive is false
b. $ alive is true 
c. $ alive is overflow 
d. the statement is snot valid

Que. 10 How many times can you define __autoload in a process?

a) once
b) twice
c) thrice
d) as many times as needed

Answersheet of these Questions will be available tomorrow....


Want More Questions CLICK BELOW LINKS 







Post a Comment

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube