What is the function preg_match_all() used for in PHP and how can it be utilized to extract specific content from a string?

The function preg_match_all() in PHP is used to perform a global regular expression match on a string and return all matches. This function can be utilized to extract specific content from a string by defining a regular expression pattern that matches the content you want to extract.

```php
$string = "The quick brown fox jumps over the lazy dog";
$pattern = '/fox|dog/';
preg_match_all($pattern, $string, $matches);

print_r($matches[0]);
```

In this code snippet, we have a string "The quick brown fox jumps over the lazy dog" and we want to extract the words "fox" and "dog". We define a regular expression pattern '/fox|dog/' to match either "fox" or "dog" in the string. The preg_match_all() function is then used to find all matches of the pattern in the string and store them in the $matches array. Finally, we print out the matched content using print_r().