03-15-2010, 11:46 PM
|
#2 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
php Code:
$l = array( 'one' => 'value for one', 'two' => 'value for two' ); // These both assign 'value for one' to $value$value = $l[ 'one']; $value = l ( 'one' );
It's just an overcomplicated method to return a value of $l based on its key. It's also a waste of resources, considering it has to first retrieve $l from the global namespace, and then just pipes back a value that you could have easily gotten on your own (as illustrated above). It doesn't perform any error checking to see if the value exists and return a default if it doesn't, which is the only reason I could see it being useful.
|
|
|
|