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

Friday, 6 February 2015


PHP Interview Questions :  

 


Que.1 In PHP language PEAR stands for

A PHP Enhancement and Application reduce
B PHP Event and Application Repository
C PHP Extension and Application Repository
D None of these above

Que.2 fopen($file_doc,”r+&rdquo opens a file for
a. reading
b. writing
c. none of above
d. both of above

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

a. sssion_decode
b. session_destroy
c. session_id
d. session_pw

Que.4 Which of following commenting is supported by Php

a. Single line c++ syntax - //
b. Shell syntax - #
c. Both of above
d. None of above

Que.5 Which of the following method sends input to a script via a URL?

a. Get
b. Post
c. Both
d. None

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

A. phpconf()
B. phpinfo()
C. phprec()
D. phpdisplay()

Que.7 Which SQL keyword is used to sort the result-set? 
 
a) ORDER
b) SORT
c) ORDER BY
d) SORT B

Que.8 When you need to obtain the ASCII value of a character which of the following function you apply in PHP?

a. chr( );
b. asc( );
c. ord( );
d. val( );

Que.9 Casting operator introduced in PHP 6 is

a. (array)
b. (int64)
c. (real) or (double) or (float)
d. (object)

Que.10 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


Answersheet :


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


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   

Solve the Questions and improve your web development skills....
 

Regards : M2Soft Solutions 

 

 


In PHP language PEAR stands for [A] PHP Enhancement and Application reduce [B] PHP Event and Application Repository [C] PHP Extension and Application Repository [D] None of these above Read more: http://www.gkseries.com/computer-engineering/php/introduction-to-php/introduction-to-php#ixzz3QxX3IaK6

© 2013-2014 http://www.gkseries.com

Wednesday, 3 September 2014

Hello Everyone...!!!


Here are some multiple choice questions by M2Soft for PHP DEVELOPERS to improve WEB DEVELOPMENT skills . 
 

PHP Questions


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

A) wrapper_register
B) stream_wrapper
C) stream_wrapper_register
D) stream_wrapper_reg

Que.2 Which of the following functions retrieve the entire contents of a file in such a way that it can be used as part of an expression? (Choose 2)

A) file_get_contents()
B) fgets()
C) fopen()
D) file()
E) readfile()

Que.3 Use the .............. to delete the data inside the table, and not the table itself?

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

Que.4 Which of the following functions reads the entire contents of a file?

A) fgets()
B) file_get_contents()
C) fread()
D) readfile()
E) file()

Que.5 What will the following script do?
<?php
echo getservbyname ('ftp', 'tcp');
?>

A) A list of the FTP servers on the local network
B) The address of the FTP server called “tcp”
C) The port associated with the TCP service called “FTP”
D) A list of the ports associated with all services except FTP


Que.6 What will the following script output?

<?php
$time = strtotime ('2004/01/01');
echo date ('H:\i:s', $time);
?>

A) 00:00:00
B) 12:00:00
C) 00:i:00
D) 12:i:00
E) -1

Que.7 Which of the following is not an SQL aggregate function?

A) AVG
B) SUM
C) MIN
D) MAX
E) CURRENT_DATE()


Que.8 What is the purpose of basename() function?

A) Returns the last accessed time of the file
B) Returns the first accessed time of the file
C) Strips of the path and returns the file name.
D) Strips of the path and returns the folder name.


Que.9 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.10 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

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

For more questions CLICK THE LINKS BELOW

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




Wednesday, 23 July 2014

Hello everyone..!!!

Today is Thursday, on every Thursday i come here with a PHP test for PHP developers..

They are the questions asked by WEB DEVELOPMENT COMPANIES in interview.. to PHP DEVELOPER


web development companies, PHP developer,PHP questions



PHP QUESTIONS :
 

Que. 1 Which of those is not magic method?


A. __autoload
B. __clone
C. __sleep
D. __toint

Que.2 What function creates a cookie?  


A. create_cookie()
B. set_cookie()
C. setcookie()
D.None of the above

Que. 3  Which of the folowing are valid float values?


A. 4.5678
B. 4.0
C. 7e4
d. All of the above

Que. 4 PHP is an open source software


A. True
B. False

Que. 5 How does the identity operator === compare two values?


A) It converts them to a common compatible data type and then compares the resulting values
B) It returns True only if they are both of the same type and value
C) If the two values are strings, it performs a lexical comparison
D) It bases its comparison on the C strcmp function exclusively
E) It converts both values to strings and compares them


Que. 6 Which keyword cannot be used while defining property?

 
A. Public
B. Static
C.Final
D.Private

Que. 7 Which PHP function or variable will return the value of current session id? 


A. session_id()
B. get_session_id;
C. $_SESSION['CURRENT_ID'];
D. $_SESSION['ID']

Que. 8 In PHP 5, how can you write a class so that some of its properties cannot be accessed from outside its methods? 

 

A. By declaring the class as private
B. By declaring the property as private
C. It cannot be done
D. By writing a property overloading method

 

Que. 9  Identify the invalid identifier



A. my-function
B. size
C. -some word
D. this&that

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


A. When the parameter is Boolean
B. When the function is being declared as a member of a class
C. When the parameter is being declared as passed by reference
D. When the function contains only one parameter
E. Never

MORE PHP INTERVIEW QUESTIONS

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-4



Please share your Experience or give any suggestions in comments...


Regards : M2 Software Solutions Pvt. Ltd.



Tuesday, 24 June 2014

PHP skill test for PHP developers

Posted by Unknown | 23:54 Categories: ,
Dear friends ...!!!
PHP,functions,


Today i am  here with some questions of PHP... to be answer...

so here we start the test...

Que.1 Who is called the father of PHP.

a) Larry Wall 
b)  Rasmus Lerdorf
c)  James Gosling
d)  Guido Van Rossum 

Que.2  What is the difference between print() and echo()?
a)  print() can be used as part of an expression, while echo() cannot.
b) echo() can be used as part of an expression, while print() cannot.
C)  echo() can be used in the CLI version of PHP, while print() cannot.
D)  both A and B

Que. 3  What is input sanitization?

a) Secure user input 
b)  Converting input into a format that PHP supports 
c)  Removing or cleaning potentially malicious user input. 
d)  All of the above
 




Que.4 The output of following script will be..


$somerar=15;

function ad it () {

GLOBAL $somevar;

$somerar++ ;

echo "somerar is $somerar";

}

addit ();

a) somerar is 15
b) somerar is 16
c)  somerar is 1
d)  somerar is $ somerar

Que.5  what will be the ouput of below code ? Assume that today is 2009-5-19:2:45:32 pm
<?php

$today = date("F j, Y, g:i a");
?> 
a) may 19,09,2:45:32 PM
b) May 19, 2009, 2:45 pm
c) May 19,2009,14:45:32 pm
d) May 19,2009,14:45:32 PM

Que. 6 What is the name of function used to convert an array into a string?

a)  explode()
b)  glue()
c)  implode()
D)  None of the above

Que. 7 If property of class is declare using var then PHP5 will treat the property as?
a)  Protected 
b)  Private 
c)  Public
d)  Final

Que. 8  What will be  the output of following script?
  
<?php
$test="3.5seconds";
settype($test,"double");
settype($test,"integer");
settype($test,"string");
print($test);
?> 


a)  3.5
b)  3.5seconds
c) 3
d)  3seconds 

Que.9 What is the name of function used to convert an array into a string?

a)  explode() 
b)  glue()
c)  implode() 
d)  None of the above 

Que. 10  The output of following script will be..

<?php
$x=array(4,2,5,1,4,5,3,4);
$y=array_count_values($x);
echo count($y);
?> 

a) 8
b) 7
c) 5
d) 28

solve the questions ... and answer them.....

regards : m2soft solutions Pvt Ltd

















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