200-550 200-550

Loading demo links...

Showing 10–12 of 15 questions

Question 10

What will the following code print out? $str = '✔ one of the following'; echo str_replace('✔', 'Check', $str);

Select an option, then click Submit answer.

  • Check one of the following

  • one of the following

  • ✔ one of the following

Question 11

What is the output of the following code?

class a

{

public $val;

}

function renderVal (a $a)

{

if ($a) { echo $a->val;

}

} renderVal (null);

Select an option, then click Submit answer.

  • A syntax error in the function declaration line

  • An error, because null is not an instance of 'a'

  • Nothing, because a null value is being passed to renderVal()

  • NULL

Question 12

Which of the following superglobals does not necessarily contain data from the client?

Select an option, then click Submit answer.

  • $_POST

  • $_SESSION

  • $_GET

  • $_SERVER