PHP Test 5

Whether One-line comment begin with pound sing(#) in php?

In PHP, during error handling include() generates ____.

What is the out put.

$qpt = 'Eat to live, but not live to eat'; 
echo preg_match("/^to/", $qpt);

What is the out put.

<code.$x=array("aaa","","ccc","ddd",""); 
$y=array_unique($x);
echo count($x) . "," . count($y);

PHP is a _____ . It means you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.

Which of the following is not a valid variable name?

PHP is

What is the out put

$father="mother"; 
$mother="son";
echo $$father;

What is the out put

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

The PHP syntax is most similar to

what will be the output of below code?

$arr = array(5 => 1, 12 => 2); 
$arr[] = 56;
$arr["x"] = 42;
echo var_dump($arr);

a. array(4) { [5]=>int(1) [12]=> int(2) [13]=> int(56) ["x"]=> int(42) }
b. array(3) { [12]=> int(2) [13]=> int(56) ["x"]=> int(42) }
c. 1,2,56,42
d. 42

what will the ouptut of below date() function ?

$date="2009-5-19";
$time="14:31:38";
$datetime=$date.$time;
echo date("Y-m-d:H:i:s",strtotime($datetime));

What is the out put

$color=array("red","yellow","white"); 
$x=in_array("black",$color);
if($x==0)
echo "good bye";
if($x==1) echo "Hello";

Trace the odd data type

In php string data are

Which of the following delimiting method is known as string Interpolation

Which datatypes are treaded as arrays

Which of following are compound data type?

Casting operator introduced in PHP 6 is?

When defining identifier in PHP you should remember that

Schreibe einen Kommentar