if (isset($lookup_table[$key])) { return $lookup_table[$key]; } else { return; } or return array_key_exists($key, $table) ? $table[$key] : null; or return $table[$key] ?? null;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter