diff --git a/reference/ds/ds/map/get.xml b/reference/ds/ds/map/get.xml index 4524a38c7..d66b7a50b 100644 --- a/reference/ds/ds/map/get.xml +++ b/reference/ds/ds/map/get.xml @@ -37,17 +37,14 @@ - - - Be careful when using array syntax. Scalar keys will be coerced to - integers by the engine. For example, $map["1"] will attempt - to access int(1), while $map->get("1") will - correctly look up the string key. - + - See Arrays. + Unlike with arrays, + numeric string keys are not cast to integers, even when using array + syntax. For example, $map["1"] and $map[1] + refer to two different keys. - + diff --git a/reference/ds/ds/map/put.xml b/reference/ds/ds/map/put.xml index 4d57949cc..e11668fb8 100644 --- a/reference/ds/ds/map/put.xml +++ b/reference/ds/ds/map/put.xml @@ -37,17 +37,14 @@ - - - Be careful when using array syntax. Scalar keys will be coerced to - integers by the engine. For example, $map["1"] will attempt - to access int(1), while $map->get("1") will - correctly look up the string key. - + - See Arrays. + Unlike with arrays, + numeric string keys are not cast to integers, even when using array + syntax. For example, $map["1"] and $map[1] + refer to two different keys. - + diff --git a/reference/ds/ds/map/remove.xml b/reference/ds/ds/map/remove.xml index d672ca893..84da2ad25 100644 --- a/reference/ds/ds/map/remove.xml +++ b/reference/ds/ds/map/remove.xml @@ -33,21 +33,18 @@ - You can also use array syntax to access values by key, eg. $map["key"]. + You can also use array syntax to remove values by key, eg. unset($map["key"]). - - - Be careful when using array syntax. Scalar keys will be coerced to - integers by the engine. For example, $map["1"] will attempt - to access int(1), while $map->get("1") will - correctly look up the string key. - + - See Arrays. + Unlike with arrays, + numeric string keys are not cast to integers, even when using array + syntax. For example, $map["1"] and $map[1] + refer to two different keys. - +