From 8b3858be3e2d75ce9f61a22d5fbf19ea149adb93 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sun, 28 Jan 2018 12:31:16 +0000 Subject: [PATCH] Fix/improve wording To detect whether the array pointer points beyond the end, we have to check whether key() returns NULL (not the opposite). We also reword to match reset() (r343965). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344002 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/next.xml | 3 +-- reference/array/functions/prev.xml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/reference/array/functions/next.xml b/reference/array/functions/next.xml index ccd9ac8c9e..b0cc5340dc 100644 --- a/reference/array/functions/next.xml +++ b/reference/array/functions/next.xml @@ -76,8 +76,7 @@ $mode = end($transport); // $mode = 'plane'; To still use next and properly check if the end of the array - has been reached, the key of the next - element should be checked to be strictly different from &null;. + has been reached, verify that the key is &null;. diff --git a/reference/array/functions/prev.xml b/reference/array/functions/prev.xml index f6eea7d4a0..cc5d4aa7fb 100644 --- a/reference/array/functions/prev.xml +++ b/reference/array/functions/prev.xml @@ -69,8 +69,8 @@ $mode = end($transport); // $mode = 'plane'; The beginning of an array is indistinguishable from a boolean &false; element. To make the distinction, check that - the key of the prev element is - strictly different from null. + the key of the prev element is not + &null;.