When writing the syntax for an associative array in PHP we do the following
$a = array('foo' => 'bar');
I am curious of the relationship of the =>
syntax, or possibly operator. Does this relate to some kind of reference used in the hash table in ZE, or some kind of subsequent right shift or reference used in C
? I guess I am just wondering the true underlying purpose of this syntax, how it relates to ZE and/or php extensions used to handle arrays, how it possibly relates to the written function in C
before compiled, or If I just have no idea what I am talking about :)
key => value
operator. It's used in foreach loops as well when you need the keys as well as the values of the array you're looping on. In Javascript, the equivalent would bevar a = {foo: 'bar'}
. – Marc B Jun 28 '11 at 17:44