Question: Which of the following tags are an acceptable way to begin a PHP Code block?
A
B
C
D
E
<SCRIPT LANGUAGE="php">
B
<!
C
<%
D
<?php
E
<?
Note: Not available
<?php
define('FOO', 10);
$array = array(10 => FOO, "FOO" => 20);
print $array[$array[FOO]] * $array["FOO"];
?><?php $a = 1; $b = 2.5; $c = 0xFF; $d = $b + $c; $e = $d * $b; $f = ($d + $e) % $a; print ($f + $e); ?>
<?php
$a = null;
$b = null;
$c = null;
$d = null;
if($a && !$b) {
if(!!$c && !$d) {
if($d && ($a || $c)) {
if(!$d && $b) {
$number = 1;
} else {
$number = 2;
}
} else {
$number = 3;
}
} else {
$number = 4;
}
} else {
$number = 5;
}
?><?php
$string = "111221";
for($i = 0; $i < strlen($string); $i++) {
$current = $string[$i];
$count = 1;
while(isset($string[$i + $count]) && ($string[$i + $count] == $current)) $count++;
$newstring .= "$count{$current}";
$i += $count-1;
}
print $newstring;
?><?php
function magic($p, $q) {
return ($q == 0) ? $p : magic($q, $p % $q);
}
?><?php $a = 1; $b = 0; ?????? $c = $a / $b; ?>