nerdexam
Zend

200-530 · Question #67

How many elements does the $matches array contain after the following function call is performed? preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/', '21st March 2006', $matches);

The correct answer is C. 3. See the full explanation below for the reasoning.

Question

How many elements does the $matches array contain after the following function call is performed? preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/', '21st March 2006', $matches);

Options

  • A1
  • B2
  • C3
  • D4

How the community answered

(36 responses)
  • A
    6% (2)
  • B
    6% (2)
  • C
    75% (27)
  • D
    14% (5)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice