PHP Test 1

Can i have new line in $subject tag of php mail function?

How do we access the value of 'c' later?

$a = array(
'a',
3 => 'b',
'c'
);

What will be displayed in a browser when the following PHP code is executed:

function changeValue(&$y) {
$y = $y + 5;
}
$myNumber = 8;
changeValue($myNumber);
echo $myNumber;

Which of the following is NOT a magic predefined constant?

function in php returns a list of response headers send(or ready to send).

What will be printed?

$a = array();
if ($a == null) {
echo 'true';
} else {
echo 'false';
}

What will be printed

if (null === false) {
echo 'true';
} else {
echo 'false';
}

What joomla in php?

What is the output?

$RESULT = 11 + 011 + 0x11;
echo "$RESULT";

(A) 37
(B) 33
(C) 22
(D) 11

What will be displayed in a browser when the following PHP code is executed:

$variable = 1;
switch ($variable) {
case 1:
echo "Hello World";
default:
echo "Hello RAM";
break;
}

Php support explicit type definition in variable declaration?

What will be the value of $var below?

$var = true ? '1' : false ? '2' : '3';

How can I create php array in a html?

What will be printed?

if ('2' == '02') { 
echo 'true';
} else {
echo 'false';
}

What will be displayed in a browser when the following PHP code is executed:

for ($counter = 20; $counter < 10; $counter++){
echo "Hello Rohan";
}
echo "Counter is: $counter";

What will be printed?

$var = 'a';
$VAR = 'b';
echo "$var$VAR";

Parent constructor are not called if the child class defines a constructor.

What will be displayed in a browser when the following PHP code is executed:

for ($counter = 15; $counter != 10; $counter--){
echo "Hello ";
}

What is the output?

$a = array(
null => 'a',
true => 'b',
false => 'c',
0 => 'd',
1 => 'e',
'' => 'f'
);
echo count($a), "\n";

What gets printed?

class MyException extends Exception {}
try {
throw new MyException('Oops!');
} catch (Exception $e) {
echo "Caught Exception\n";
} catch (MyException $e) {
echo "Caught MyException\n";
}

Schreibe einen Kommentar