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

















7 comments:

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