Is there some way to get rid of the ugly duplicate mentions of complicated variables in PHP?

I often encounter situations like this: function stuff() { $feed_data = blablabla(…); if ($feed_data && isset($feed_data[‘posts’][0][‘title’])) return $feed_data[‘posts’][0][‘title’]; return false; } As you can see, $feed_data[‘posts’][0][‘title’] is returned, but it’s first checked with isset() to make sure it actually exists, which is not guaranteed. If I do not include the isset() check, it can log…

Details