diff --git a/reference/array/functions/in-array.xml b/reference/array/functions/in-array.xml index 8b2da4cc4c40..d1dccc2794ad 100644 --- a/reference/array/functions/in-array.xml +++ b/reference/array/functions/in-array.xml @@ -55,12 +55,16 @@ - Prior to PHP 8.0.0, a string needle will match an array - value of 0 in non-strict mode, and vice versa. That may lead to undesireable - results. Similar edge cases exist for other types, as well. If not absolutely certain of the - types of values involved, always use the strict flag to avoid unexpected behavior. - - + Prior to PHP 8.0.0, a string needle would loosely match + a numeric haystack value of 0, and vice versa. + As of PHP 8.0.0, this behavior is restricted to numeric strings. However, non-strict mode + still employs loose comparison (==), which allows for matches across + unrelated types. For example, a boolean &true; value in the + haystack will match any non-empty string + needle. It is recommended to use the strict + flag to ensure type-safe results. + +