nerdexam
Zend

200-530 · Question #92

How many elements does the array $matches from the following code contain? 1 <?php 2 $str = "The cat sat on the roof of their house."; 4 $matches = preg_split("/(the)/i", $str, -1…

The correct answer is D. 7. Zend 200-530 Exam

Performance Monitoring and Troubleshooting

Question

How many elements does the array $matches from the following code contain? 1 <?php 2 $str = "The cat sat on the roof of their house."; 4 $matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE); 5 ?>

Options

  • A2
  • B3
  • C4
  • D7
  • E9

How the community answered

(29 responses)
  • B
    7% (2)
  • C
    3% (1)
  • D
    83% (24)
  • E
    7% (2)

Explanation

Zend 200-530 Exam

Topics

#PHP#preg_split#regex#array manipulation

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice