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 8 Question 32 Discussion

How many elements does the array $pieces contain after the following piece of code has been executed?$pieces = explode("/", "///");
C) 4
A) 0
B) 3
D) 5

Zend 200-710 Exam - Topic 8 Question 32 Discussion

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

How many elements does the array $pieces contain after the following piece of code has been executed?

$pieces = explode("/", "///");

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Joaquin
11 months ago
Yup, 4 is right!
upvoted 0 times
...
Louann
11 months ago
Definitely 4, those extra slashes count as empty strings.
upvoted 0 times
...
Devora
11 months ago
Wait, how can there be 4? That seems off.
upvoted 0 times
...
Kristin
11 months ago
I thought it would be 3, but I guess it’s 4!
upvoted 0 times
...
Elina
11 months ago
It contains 4 elements.
upvoted 0 times
...
Tori
12 months ago
I feel like I’ve seen something similar before, and I think the answer is 4 because it counts the empty strings between the slashes.
upvoted 0 times
...
Aja
12 months ago
I’m a bit confused. I thought it would return 3 because there are three slashes, but I guess it could be more due to the empty strings.
upvoted 0 times
...
Penney
12 months ago
I remember a practice question where explode returned an array with empty elements for consecutive delimiters. So, I think it might be 4 elements here.
upvoted 0 times
...
Kimberlie
12 months ago
I think the explode function splits the string by the delimiter, but I'm not sure how it handles consecutive delimiters.
upvoted 0 times
...
Rebeca
12 months ago
I'm not sure about the "prevent code changes" option - that seems a bit odd. I'll need to think through the implications of that one.
upvoted 0 times
...
Lenna
12 months ago
I think the issue might be related to the mismatch in interfaces, like option A mentions the PE-facing interface, but I'm not completely sure.
upvoted 0 times
...
Jean
12 months ago
Hmm, I'm not sure. Letting students use any computer as needed could work, but it might get chaotic. I'll have to think this through carefully.
upvoted 0 times
...
Malinda
1 year ago
I think the main concern is definitely about control over the devices. Corporations can't manage personal devices as well as their own.
upvoted 0 times
...

Save Cancel