[wp-trac] [WordPress Trac] #21556: Function to return value of an array element taking the array and a key as input
WordPress Trac
wp-trac at lists.automattic.com
Sun Aug 12 16:49:10 UTC 2012
#21556: Function to return value of an array element taking the array and a key as
input
-------------------------+------------------------------
Reporter: gkb6891 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by wonderboymusic):
I don't think you need an accessor function like that, it's too much
reflection. Reading values is like 1000x's faster than reading the return
value of a function call in PHP. And instead of setting {{{$value =
$arr[$key]}}}, just refer to it as {{{$arr[$key]}}} unless you act on it
by calling {{{trim()}}} or something
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21556#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list