How can PHP be used to parse and manipulate date strings to extract only the year?
When working with date strings in PHP, we can use the `DateTime` class to easily parse and manipulate dates. To extract only the year from a date string, we can create a `DateTime` object using the date string, and then use the `format()` method with the 'Y' format specifier to retrieve the year.
$dateString = "2022-10-15";
$date = new DateTime($dateString);
$year = $date->format('Y');
echo $year; // Output: 2022