Duplicate keys in array literals?

Jacob Carlborg doob at me.com
Thu Nov 28 12:01:42 PST 2013


On 2013-11-28 18:55, luka8088 wrote:

> PHP also allows it:
>
> $data = array('a' => 1, 'a' => 2);
>
> And I find it to be only a source of bugs.

Arrays are a weird beast in PHP. They're both arrays and associative 
arrays, at the same time, somehow.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list