Skip to content

Regression with locales when using SQLSRV #1532

@mpociot

Description

@mpociot

PHP version

8.4.3 / 8.3.17

PHP SQLSRV or PDO_SQLSRV version

5.12.0

Problem description

When the sqlsrv or pdo_sqlsrv extension is installed, there is a strange regression error when using certain locale specific PHP functions.

Expected behavior and actual behavior

Create a new file called test.php with the following content:

<?php

echo str_word_count('мама', 0, null);

The expected output of this is 0.
When the SQLSRV extension is enabled, this code returns 4.

Disabling the extension lets the code return 0 again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions