Is there a way to use the PHP => operator (?) without using the array() "constructor"?
To be specific, I want to create a function that will get a list of keys and values without wrapping it into an array:
function keysAndValues($items) {
/* ... */
}
keysAndValues(
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3'
);
Instead of
keysAndValues(array(
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3'
));
Is there a way to do this?