[php-src] Issue #10976: change default behaviour of in_array to strict instead of loose

From: Date: Wed, 29 Mar 2023 21:16:57 +0000
Subject: [php-src] Issue #10976: change default behaviour of in_array to strict instead of loose
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244047@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10976 Author: remco-pc ### Description as the title says: Because of this uncertainty in loose comparison: 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 undesirable 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. it just leads to bugs if you forgot the true.

« previous php.bugs (#244047) next »