nerdexam
Zend

200-550 · Question #181

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

Options

  • A1
  • B2
  • C3
  • D4

How the community answered

(25 responses)
  • A
    16% (4)
  • B
    4% (1)
  • C
    72% (18)
  • D
    8% (2)

Community Discussion

No community discussion yet for this question.

Full 200-550 Practice