13 quizzes found.

Which of the following tags are an acceptable way to begin a PHP Code block?

  1. <SCRIPT LANGUAGE="php">
  2. <!
  3. <%
  4. <?php
  5. <?

Choose 4 answers

The ____ operator is used to test if two values are identical in every way.

  1. !==
  2. instanceof
  3. =
  4. ==
  5. ===

Choose 1 answers

What would go in place of ?????? below to make this script execute without a fatal error?

<?php$a = 1;$b = 0;??????$c = $a / $b;?>
  1. quit();
  2. die();
  3. stop();
  4. __halt_compiler();
  5. exit();

Choose 3 answers

What is the output of the following?

<?php$a = 010;$b = 0xA;$c = 2;print $a + $b + $c;?>
  1. 20
  2. 22
  3. 18
  4. $a is an invalid value
  5. 2

Choose 1 answers

For an arbitrary string $mystring, which of the following checks will correctly determine if the string PHP exists within it?

  1. if(strpos($mystring, "PHP") !== false)
  2. if(!strpos($mystring,"PHP"))
  3. if(strpos($mystring, "PHP") === true)
  4. if(strloc($mystring, "PHP") == true)
  5. if(strloc($mystring, "PHP") === false)

Choose 1 answers