Consider the following two files. When you run test.php, what would the output look like?

Consider the following two files. When you run test.php, what would the output look like?

test.php:

include "MyString.php";

print",";

print strlen("Hello world!");

MyString.php:

namespace MyFrameworkString;

function strlen($str)

{

return strlen($str)*2; // return double the string length

}

print strlen("Hello world!")
A . 12,12
B . 12,24
C . 24,12
D . 24,24
E . PHP Fatal error: Cannot redeclare strlen()

Answer: C

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments