Zend
200-710 · Question #203
How many elements does the array $matches from the following code contain? $str = "The cat sat on the roof of their house."; $matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
The correct answer is D. 7. See the full explanation below for the reasoning.
Question
How many elements does the array $matches from the following code contain?
$str = "The cat sat on the roof of their house.";
$matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
Options
- A2
- B3
- C4
- D7
- E9
How the community answered
(32 responses)- A6% (2)
- C3% (1)
- D81% (26)
- E9% (3)
Community Discussion
No community discussion yet for this question.