mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-24 19:19:06 +00:00
Use isset() for performance. Same difference.
This commit is contained in:
@@ -136,7 +136,8 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator {
|
||||
*/
|
||||
public function offsetGet($offset) {
|
||||
$offsetlower = strtolower($offset);
|
||||
return array_key_exists($offsetlower, $this->data) ? $this->data[$offsetlower] : NULL;
|
||||
// As isset() is false on 'NULL' anyway, use it, and return NULL, faster
|
||||
return isset($this->data[$offsetlower]) ? $this->data[$offsetlower] : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user