How can PHP 7 simplify accessing array values by key, especially when the key may not exist?

When accessing array values by key in PHP, it can be cumbersome to check if the key exists before retrieving the value, especially when dealing with nested arrays. PHP 7 introduced the null coalescing operator (??) which simplifies this process by providing a default value if the key does not exist in the array.

// Using the null coalescing operator to simplify accessing array values by key
$array = ['key1' => 'value1', 'key2' => 'value2'];

// Instead of:
$value = isset($array['key3']) ? $array['key3'] : 'default';

// We can now use:
$value = $array['key3'] ?? 'default';