Maps or associative arrays are similar to those found in PHP, as well as having similarities to dictionaries. They differ from ordinary lists in that they store a pair of values. It stores a key which is used to access a value. The key is the left of the fat arrow.
Since these associative arrays are also maps from a key to a value, the associated
functions are called map functions, for example map_put. Prior
to version 1.9.9, these functions started with associative_array_
instead of map_, for example
associative_array_put. Since version 1.9.9 they have been swapped around.
Both work in place of each other since prior to version 1.9.9, map_put was an aliase for
associative_array_put, however it has since been swapped around.
$a = [44 => 32, 99 => 93]
The empty associative array, which can particularly useful
when determining the type of a variable, is represented as [=>]:
$a = [44 => 32, 99 => 93] print(get_type($a) == get_type([=>]))
Prior to version 1.5.3, associative arrays were enclosed in
braces ({ }) as opposed to the square brackets
used now ([ ]). This change made only a small difference to
coding and has no effect on the underlying representation of
associative arrays.

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days.
Comments powered by BalfComment