Cyber Monday 2024! 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 59 Discussion

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

What is the return value of the following code: substr_compare("foobar", "bar", 3);

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Leslie
6 months ago
That makes sense, Felix. But in this case, 'bar' is found in 'foobar' starting from position 3, so the function should return 0.
upvoted 0 times
...
Felix
6 months ago
I'm not sure, but I think it might be A) -1 because it returns a negative number if the first string is less than the second string.
upvoted 0 times
...
Rasheeda
6 months ago
I agree with Leslie, because substr_compare compares two strings starting from a given position.
upvoted 0 times
...
Leslie
6 months ago
I think the return value is D) 0.
upvoted 0 times
...
Cecily
6 months ago
I'm not sure, but I think C) TRUE is the answer because substr_compare returns a boolean value.
upvoted 0 times
...
Rima
7 months ago
I believe the correct answer is 0 because the function returns 0 if the two strings are equal.
upvoted 0 times
...
Keena
7 months ago
I agree with Francene, the return value should be -1.
upvoted 0 times
...
Francene
7 months ago
I think the return value would be -1 because 'bar' starts at position 3 in 'foobar'.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77