Showing posts with label PHP interview questions. Show all posts
Showing posts with label PHP interview questions. Show all posts

Friday, 8 May 2015

PHP company
Que.1 . mysql_connect( ) does not take following parameter

A. database host
B. user ID
C. password
D. database name
                                                                                Ans : D

Que.2 Which of the following is not a session function?

A. sssion_decode
B. session_destroy
C. session_id
D. session_pw
                                                                              Ans : D
Que.3 Php supports all four different ways of delimiting. In this context identify the false statement

A. You can use any of the delimiting style
B. You can use different delimiting styles in same page
C. You can use any delimiting style but must use a single style consistently for a page
D. Variables declared in previous blocks are remenbered on later blocks too!
                                                                             Ans : C

Que.4 How many methods are available for the exception class?

a) 5
b) 6
c) 7
d) 8
                                                                             Ans : C

Que.5 Which of the following statements invoke the exception class?

a) throws new Exception();
b) throw new Exception();
c) new Exception();
d) new throws Exception();
                                                                            Ans : B

Que.6 Which one of the following PHP function is used to determine a file’s last access time?

a) fileltime()
b) filectime()
c) fileatime()
d) filetime()
                                                                            Ans : C
 
Que.7  Which function is useful when you want to output the executed command’s result?

a) out_cmm()
b) out_system()
c) cmm()
d) system()
                                                                           Ans : D

Que.8  The authenticationFile.txt, the file which stores username and password should be stored ___ the server document root.

a) Inside
b) Outside
c) Within
d) None of the above
                                                                         Ans : B
Que. 9  The authenticationFile.txt, the file which stores username and password should be stored ___ the server document root.

a) Inside
b) Outside
c) Within
d) None of the above
                                                                         Ans : B
Que.10 Which one of the following function is capable of reading a file into an array?

a) file()
b) arrfile()
c) arr_file()
d) file_arr()
                                                                        Ans : A

Want more Questions.. Click the links below :

 

Monday, 20 April 2015

PHP Interview Questions


Que.1 How do I find out the number of parameters passed into function?
A) By using func_num_args()

B) By using func_get_arg()
C) By using func_get_args()
D) None of the above


Que. 2 . . . . . converts the keys of an array into values and the values into keys.
A) array_flips()
B) array_transpose()
C) array_trans()
D) array_flip()


Que.3 Which of the following statements is FALSE for PHP Error and Logging?

A) The error and logging functions are part of the PHP core
B) Both a and c below
C) debug_backtrace() generates a backtrace
Dtrigger_error() and user_error() are different


Que.4 Returning values from functions may include .....

A) Arrays
B) Objects
C) Both A & B
D) None of above
 

Que.5 Which array function checks if the specified key exists in the array

A) array_key_exist()
B) array_key_exists()
C) array_keys_exists()
D) arrays_key_exists()



Que.6 flock() is used to unlock a file so that two or more people do not get access to it at the same time.
A) True
B) False


Que.7 You must make a call to ................... to specify what time zone you want calculations to take place in before calling any date functions.
A) date_default_timezone_set()
B) datedefault_timezone_set()
C) date_defaulttimezone_set()
D) date_default_timezoneset() 


Que.8 The ........... function is used to read a single character from a file.
A) fgetc()
B) fgets()
C) fget()
D) fgetf()


Que.9 Which of the following DBMSs do not have a native PHP extension?
A) MySQL
B) IBM DB/2
C) Microsoft SQL Server
D) None of the above


Que.10  The ......... function parses an English textual date or time into a Unix timestamp
A) strtodate()
B) stroftime()
C) strtotime()
D) str_to_time()


Answers :

1)  A,  2) D, 3) D, 4) C, 5) B, 6) B, 7) A, 8) A, 9) E, 10) C
 


 
Want more Questions....??? CLICK THE LINKS BELOW

 









 






Regards : PHP Web Development company


Thursday, 12 March 2015

Image result for PHP interview questions

Questions :

 

Que.1 Which of the following DBMSs do not have a native PHP extension?
A) MySQL
B) IBM DB/2
C) PostgreSQL
D) Microsoft SQL Server
E) None of the above


Que.2 Which array function checks if the specified key exists in the array
A) array_key_exist()
B) array_key_exists()
C) array_keys_exists()
D) arrays_key_exists()


Que.3 Transactions are used to treat sets of SQL statements atomically.
A) True
B) False


Que.4 The ___________ function can be used to compare two strings using a case-insensitive binary algorithm

A) strcmp()

B) stricmp()
C) strcasecmp()
D) stristr()
E) None of the above


Que.5 fgets() is used to read a file one line at a time

A) True
B) False


Que.6 Which of the following functions do not return a timestamp?

A) time()
B) date()
C) strtotime()
D) localtime()
E) gmmktime()


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

A) DROP TABLE
B) DELETE TABLE
C) DEL TABLE
D) REMOVE TABLE


Que.8   flock() is used to unlock a file so that two or more people do not get access to it at the same time.

A) True
B) False


Que.9 Which of the following is not an SQL aggregate function?
A) AVG
B) SUM
C) MIN
D) MAX
E) CURRENT_DATE()


Que.10 In PHP in order to access MySQL database you will use:
A) mysqlconnect() function
B) mysql-connect() function
C) mysql_connect() function
D) sql_connect() function


Answers : 


Que.1   E,  Que.2   B,  Que.3   A,  Que.4   C,  Que.5   A,     Que.6   B,  Que.7   A, Que.8   B, Que.9   E,  Que.10 C

Want more Questions CLICK THE LINKS BELOW :


PHP Multiple choice questions and answers-1
  PHP Multiple choice questions and answers-2 
  PHP Multiple choice questions and answers-3
  PHP Multiple choice questions and answers-4
  PHP Multiple choice questions-5 
  PHP Multiple choice questions and answers-6 
  PHP Multiple choice questions and answers-7
  PHP Multiple choice questions and answers-8
  PHP Multiple choice questions and answers-9
  PHP Multiple choice questions and answers-10  
  PHP Multiple choice Questions and answers-11
  PHP Multiple choice Questions and answers-12
  PHP Multiple choice questions and answers-13 
  PHP Multiple choice questions and answers-14

 

Need PHP web development services ??  Visit us at : M2Soft Solutions 


Thursday, 15 January 2015


Custom Web Develoment company

Today i am here with some sets of PHP interview questions with answers for PHP developers, to improve web development skills. and prepare for interviews...

PHP Questions :


Que.1 When serializing and unserializing an object, which of the following precautions should you keep in mind? (Choose two)

A. Always escape member properties that contain user input.
B. If the object contains resource variables, use magic functions to restore the resources upon unserialization.
C. Use the magic functions to only save what is necessary.
D. Always use a transaction when saving the information to a database. 

Que.2 Which of the following form element names can be used to create an array in PHP?
A. foo
B. [foo]
C. foo[]
D. foo[bar] 

Que.3 What will the following script output?

$x = 3 - 5 % 3;

echo $x;

?>

A. 2
B. 1
C. Null
D. True 
Que.4 Why must you call session_start() prior to any output?A. Because it is easy to forget if not placed at the top of your scripts.
B. Because you can no longer access the session data store after there has been output.
C. Because session_start() sets some HTTP headers.
D. Because calling session_start() causes the HTTP headers to be sent.
Que.5 Which of the following represents the proper way to set a session variable?
A. $_SESSION[‘foo’] = ‘bar’;
B. session_start();
C. session_set_save_handler (‘myopen’, ‘myclose’, ‘myread’,‘mywrite’, ‘mydelete’, ‘mygarbage’);
D. $foo = $_SESSION[‘foo’];

Que.6 Is it possible to pass data from PHP to JavaScript?
A. No, because PHP is server-side, and JavaScript is client-side.
B. No, because PHP is a loosely typed language.
C. Yes, because JavaScript executes before PHP.
D. Yes, because PHP can generate valid JavaScript

Que.7 Which of the following types can be used as an array key? (Select three.)

A. Integer
B. Floating-point
C. Array
D. Object
E. Boolean

Que. 8 Which types of form elements can be excluded from the HTTP request?

A. text, radio, and check box
B. text, submit, and hidden
C. submit and hidden
D. radio and check box

Que.9 Which of the following functions can be used to sort an array by its keys in descending order?
A. sort
B. rsort
C. ksort
D. krsort

Que.10 Which of the following represents the proper way to set a session variable?

A. $_SESSION[‘foo’] = ‘bar’;
B. session_start();
C. session_set_save_handler (‘myopen’, ‘myclose’, ‘myread’,
‘mywrite’, ‘mydelete’, ‘mygarbage’);
D. $foo = $_SESSION[‘foo’];


Answers :


Que.1           B and C
Que.2           C
Que.3           B
Que.4           C
Que.5           A
Que.6           D
Que.7           A,B and E
Que.8           D
Que.9           D
Que.10         A


Want More Questions CLICK THE LINKS BELOW


PHP Multiple choice questions and answers-2





PHP Multiple choice questions and answers-8
PHP Multiple choice questions and answers-10
PHP Multiple choice Questions and answers-11
PHP Multiple choice Questions and answers-12
PHP Multiple choice Questions and answers-13
Share your Experience or any suggestions with us in comment 
 

Thursday, 11 December 2014

Hello Everyone...!!!

To be in Best web development company as a PHP web developer it is very important to Practice PHP Questions. here are more then 150 PHP multiple choice questions and answers . Solve the questions and improve web development skills..

Here is the answersheet for yesterday's questions "PHP web Development interview questions".


For Questions CLICK HERE : PHP web Development interview questions


                                                  Answer-Sheet
                    Question                                           Answer
                       Que.1                                                           C
                       Que.2                                                           A
                       Que.3                                                           A
                       Que.4                                                           B
                       Que.5                                                           A
                       Que.6                                                           C
                       Que.7                                                           D
                       Que.8                                                           C
                       Que.9                                                           A
                       Que.10                                                         D

Want more Questions....???   CLICK THE LINKS BELOW


 
 
 
 
 

Share your experience or any suggestion with us .. VIA COMMENTS





Thursday, 4 December 2014

Hello Everyone...!!!
Web Development Company

Today i am here with more then 200 Quetions for PHP developers to improve their web development skills and prepare for interviews.
 Questions :


Que.1 When defining identifier in PHP you should remember that 
a.  Identifier are case sensitive. So $result is different than $ result 
b.  Identifiers can be any length 
c.  Both of above 
d.  None of above
Que.2 mysql_connect( ) does not take following parameter
a.       database host
b.      user ID
c.       password
d.      database name 
  
Que.3 How would you start a session?

a. session(start);
b. session();
c. session_start();
d. begin_session();

Que.4  For integer data type PHP 6 introduced 
a.      8 bit integer value
b.      16 bit integer value 
c.       32 bit integer value 
d.      64 bit integer value
Que.5 Which of the following functions require the allow-url-fopen must be enabled?
  
a.  include() 
b.  require() 
c.  both of above 
d.  None of above
Que.6 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.7  Variables/functions in PHP don't work directly with:

a. echo()
b. isset()
c. print()
d. All of the above
Que.8  Identify the variable scope that is not supported by PHP
  
a.  Local variables 
b.  Function parameters 
c.  Hidden variables 
d.  Global variables
Que.8  which of the following is a correct declaration?

a. static $varb = array(1,'val',3);
b. static $varb = 1+(2*90);
c. static $varb = sqrt(81);
d. static $varb = new Object;
Que.9 Which of the following variables is not related to file uploads?

a. max_file_size
b. max_execution_time
c. post_max_size
d. max_input_time

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

a. static
b. global
c. session_register
d. None of the above

Thursday, 4 September 2014

Hello Everyone... !!
PHP Questions and answers for PHP developers, PHP technical questions for interview, PHP interview questions,

As you all know every Thursday M2Soft conduct a Quiz for PHP DEVELOPERS to improve their WEB DEVELOPMENT skills

And on every Friday we provide answer-sheet to check the answers.

Check the answers for yesterday's test that is PHP Quizzz.

For Questions CLICK HERE : PHP Quizzz

Answer-Sheet


                 QUESTIONS                              ANSWERS
                      
                      Que.1                                           C
                      Que.2                                           A
                      Que.3                                           C
                      Que.4                                           B
                      Que.5                                           C
                      Que.6                                           C
                      Que.7                                           E
                      Que.8                                           C
                      Que.9                                           B
                      Que.10                                         C


For more Questions and answers CLICK THE LINKS BELOW

Share your experience or any suggestion with us .. VIA COMMENTS





Wednesday, 9 July 2014

Hello friends...!!! 

So , here is the time for weekly test for PHP developer 

 

PHP developer

 


QUESTIONS  :




Que. 1 Identify the variable scope that is not supported by PHP

 
a. Local variables

b. Function parameters

c. Hidden variables

d. Global variables
 

Que.2 Which of the following functions require the allow-url-fopen must be enabled?


A include()

b. require()

c. both of above

d. None of above

Que 3 On failure of which statement the script execution stops displaying error/warning message?

 

a. rinclude ()

b. require ()

c. both of above

d. None of above

Que 4 Trace the function that does continue the script execution even if the file inclusion fails


a. include ()

b. require ()

c. both of above

d. None of above

Que 5 Which of the following delimiting method is known as string Interpolation


a. delimited by single quote

b. delimited by double quote

c. delimited by <<< identifier

d. All of above

Que. 6 Casting operator introduced in PHP 6 is


a. (array)

b. (int64)

c. (real) or (double) or (float)

d. (object)

Que. .7 When defining identifier in PHP you should remember that


a. Identifier are case sensitive. So $result is different than $ result

b. Identifiers can be any length

c. Both of above

d. None of above

Que . 8 What is the correct way to include the file "time.inc" ? 

a) <!--include file="time.inc"-->

b) <% include file="time.inc" %>

c) <?phpinclude_file("time.inc"); ?>

d) <?php require("time.inc"); ?

Que 9 PHP allows you to send emails directly from a script 

a) True
b) False

Que. 10 .In PHP, the die() and exit() functions do the exact same thing.

a) False

b) True

Que 11 With SQL, how do you select a column named "FirstName" from a table named "Persons"?

 

a) EXTRACT FirstName FROM Persons

b) SELECT Persons.FirstName

c) SELECT FirstName FROM Persons

d) None of these

Que. 12 The HTML ______ tag is used to insert a JavaScript into an HTML page.


a)<scripting>

b)<script>

c)<javascript>

d)None of these

Que. 13 Which SQL keyword is used to sort the result-set?


a) ORDER

b) SORT

c) ORDER BY

d) SORT BY

Que 14 Which event will be occur when user enter or leave the page?


a) OnFocus, OnBlur

b) OnFocus, OnChange

c) OnLoad, OnUnload

d) None of these

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


a) $_POST

b) $_GET

c) Both a & b

d) None of these


Answer the questions....


Answer-sheet of questions will be available tomorrow...


Share your experience with us... in comments  


Regards : m2soft solutions Pvt. Ltd. 



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