Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 9 Question 65 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 65
Topic #: 9
[All 200-710 Questions]

What is the output of the following code?

$f = function () { return "hello"; };

echo gettype($f);

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Celestina
13 days ago
I wonder if there's a secret 'E) Spaghetti' option hidden in the code somewhere...
upvoted 0 times
...
Laurena
14 days ago
Well, if I don't know the answer, I'll just take a wild guess and choose 'hello'. What could go wrong?
upvoted 0 times
...
Zoila
16 days ago
D. function - that's an easy one, I can't believe anyone would choose anything else!
upvoted 0 times
Diego
2 days ago
A) hello
upvoted 0 times
...
...
Nada
22 days ago
Hmm, I'd guess 'object' since functions are considered objects in PHP.
upvoted 0 times
Noel
3 days ago
B) string
upvoted 0 times
...
...
Lashawna
25 days ago
The output should be 'function' since the variable $f is assigned a function.
upvoted 0 times
Elfriede
18 days ago
B) string
upvoted 0 times
...
...
Lili
2 months ago
D) function
upvoted 0 times
...
Jeff
2 months ago
I think the output is B) string because the function returns a string value.
upvoted 0 times
...
Chantell
2 months ago
B) string
upvoted 0 times
...
Gilbert
2 months ago
D) function
upvoted 0 times
...
Sharika
2 months ago
I think it's B) string because the function returns a string.
upvoted 0 times
...
Shenika
2 months ago
B) string
upvoted 0 times
...

Save Cancel