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 200-710 Exam - 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:

0/2000 characters
Mireya
4 months ago
I thought it would be an object, but I guess I was wrong!
upvoted 0 times
...
Melodie
4 months ago
No way, it's definitely not a string.
upvoted 0 times
...
Dean
4 months ago
Wait, isn't it just a string since it returns "hello"?
upvoted 0 times
...
Lashaunda
5 months ago
Definitely going with D!
upvoted 0 times
...
Irma
5 months ago
It's a function, so the output is "function".
upvoted 0 times
...
Ernest
5 months ago
I’m leaning towards "object" because it seems like functions are treated as objects in some contexts, but I could be wrong.
upvoted 0 times
...
Deangelo
5 months ago
I'm a bit confused because I thought gettype would return the type of the return value, but I guess it returns the type of the variable itself?
upvoted 0 times
...
Alease
5 months ago
I remember practicing a similar question where we had to identify the type of a variable, and it was about functions too. I feel like the answer is D.
upvoted 0 times
...
Shay
6 months ago
I think the output should be "function" since $f is a function variable, but I'm not entirely sure.
upvoted 0 times
...
Isidra
6 months ago
Okay, I think I've got it. The `gettype()` function will return the data type of the variable `$f`, which is a function. So the answer is D.
upvoted 0 times
...
Catherin
6 months ago
I'm a bit confused here. The function is being assigned to a variable, so I'm not sure if the output will be the string "hello" or the data type of the variable. I'll need to double-check my understanding.
upvoted 0 times
...
Lacresha
6 months ago
I'm pretty confident the answer is B. The `gettype()` function will return the data type of the variable, which in this case is a string since the function returns a string.
upvoted 0 times
...
Jannette
6 months ago
Okay, let's see. The code defines a function that returns "hello", and then we're asked about the output of `gettype($f)`. I'm guessing it's going to be "function".
upvoted 0 times
...
Luann
6 months ago
Hmm, this looks like a tricky one. I'll need to think it through carefully.
upvoted 0 times
...
Janessa
6 months ago
Hmm, this question seems pretty straightforward. I think I've got a good handle on how KMS envelope encryption works, so I should be able to identify the incorrect statement.
upvoted 0 times
...
Casie
6 months ago
This seems like a complex question with a lot of details to consider. I'll need to carefully read through the scenario and the options to determine the best approach.
upvoted 0 times
...
Louvenia
6 months ago
Hmm, I'm a little unsure about this one. I know piece rate and commissions are individual incentive plans, but I can't quite remember if profit-sharing counts as a group plan or not.
upvoted 0 times
...
Aliza
6 months ago
I feel pretty confident that the answer is Occupational Noise Exposure. OSHA definitely has standards in place to protect workers from excessive noise levels in the workplace. That seems like the most relevant option here.
upvoted 0 times
...
Celestina
10 months ago
I wonder if there's a secret 'E) Spaghetti' option hidden in the code somewhere...
upvoted 0 times
...
Laurena
10 months 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
10 months ago
D. function - that's an easy one, I can't believe anyone would choose anything else!
upvoted 0 times
Alpha
9 months ago
D) function - that's an easy one, I can't believe anyone would choose anything else!
upvoted 0 times
...
Elizabeth
9 months ago
C) object
upvoted 0 times
...
Rolland
9 months ago
B) string
upvoted 0 times
...
Diego
10 months ago
A) hello
upvoted 0 times
...
...
Nada
11 months ago
Hmm, I'd guess 'object' since functions are considered objects in PHP.
upvoted 0 times
Nicolette
10 months ago
Correct, it's B) string
upvoted 0 times
...
Leatha
10 months ago
I think it's D) function
upvoted 0 times
...
Noel
10 months ago
B) string
upvoted 0 times
...
...
Lashawna
11 months ago
The output should be 'function' since the variable $f is assigned a function.
upvoted 0 times
Inocencia
9 months ago
Oh, I see. Thanks for clarifying!
upvoted 0 times
...
Kenneth
10 months ago
No, the output is 'object' because the variable $f is assigned a function.
upvoted 0 times
...
Elfriede
10 months ago
B) string
upvoted 0 times
...
...
Lili
11 months ago
D) function
upvoted 0 times
...
Jeff
11 months ago
I think the output is B) string because the function returns a string value.
upvoted 0 times
...
Chantell
12 months ago
B) string
upvoted 0 times
...
Gilbert
12 months ago
D) function
upvoted 0 times
...
Sharika
12 months ago
I think it's B) string because the function returns a string.
upvoted 0 times
...
Shenika
12 months ago
B) string
upvoted 0 times
...

Save Cancel