Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 428 Bytes

0438.md

File metadata and controls

22 lines (18 loc) · 428 Bytes

What is the output of the following code?

$pattern = '/[a-z]{4} /';
$string = 'Mary had a little lamb';
$matches = preg_match($pattern$string);
print_r($matches);
  • A) 1
  • B) 2
  • C) null
  • D) 4
Answer

Answer: A