Question 70
The requirement is to return true for the case in which a string $str contains
another string $substr after the first character of $str? Which of the following
will return true when string $str contains string $substr, but only after the first
character of $str?
I.
function test($str, $substr) {
return strpos(substr($str,1), $substr) >= 0;
\}
?>
II.
function test($str, $substr) {
return strrchr($str, $substr) !== false;
\}
?>
III.
function test($str, $substr) {
return strpos($str, $substr) > 0;
\}
?>
A. I only
B. II only
C. III only
D. I and II
E. I and III
F. II and III