src/Assertions/Base/AbstractAssert.php
/**
     * Checks if strings should be considered equal.
     *
     * @param string $expected          The expected value.
     * @param string $value             The value.
     * @param bool   $isCaseInsensitive If true, check case-insensitive.
     * @param bool   $isRegexp          If true, the expected value is a regular expression.
     *
     * @return bool True if strings are considered equal, false otherwise.
     */
Checks if strings should be considered equal.
@param string $expected          The expected value.
@param string $value             The value.
@param bool   $isCaseInsensitive If true, check case-insensitive.
@param bool   $isRegexp          If true, the expected value is a regular expression.

@return bool True if strings are considered equal, false otherwise.
Checks if strings should be considered equal . @param string $expected The expected value . @param string $value The value . @param bool $isCaseInsensitive If true check case - insensitive . @param bool $isRegexp If true the expected value is a regular expression . @return bool True if strings are considered equal false otherwise .
private static function checkStringEquals(string $expected, string $value, bool $isCaseInsensitive, bool $isRegexp): bool
    {
        if ($isRegexp) {
            return preg_match('/^' . $expected . '$/' . ($isCaseInsensitive ? 'i' : ''), $value) === 1;
        }
        return $isCaseInsensitive ?
            mb_strtolower($expected) === mb_strtolower($value) :
            $expected === $value;
    }
private static function checkStringEquals ( string $ expected , string $ value , bool $ isCaseInsensitive , bool $ isRegexp ) : bool { if ( $ isRegexp ) { return preg_match ( '/^' . $ expected . '$/' . ( $ isCaseInsensitive ? 'i' : '' ) , $ value ) === 1 ; } return $ isCaseInsensitive ? mb_strtolower ( $ expected ) === mb_strtolower ( $ value ) : $ expected === $ value ; }
Checks if strings should be considered equal.
Checks if strings should be considered equal .