Skip to content

ext/mbstring: Fix deprecation warning#21363

Open
petk wants to merge 1 commit intophp:masterfrom
petk:patch-ext-mbstring-gen-rare-cp-bitvec
Open

ext/mbstring: Fix deprecation warning#21363
petk wants to merge 1 commit intophp:masterfrom
petk:patch-ext-mbstring-gen-rare-cp-bitvec

Conversation

@petk
Copy link
Member

@petk petk commented Mar 6, 2026

This fixes the PHP deprecation warning:

PHP Deprecated:  Implicit conversion from float 2048.96875 to int
loses precision in .../ext/mbstring/gen_rare_cp_bitvec.php on line 9

This fixes the PHP deprecation warning:

    PHP Deprecated:  Implicit conversion from float 2048.96875 to int
    loses precision in .../ext/mbstring/gen_rare_cp_bitvec.php on line 9
@petk petk marked this pull request as ready for review March 6, 2026 20:20
@alexdowad
Copy link
Contributor

Hi, @petk.
This "deprecation warning" looks extremely strange to me. 0xFFFF is an integer, not a float. Why would PHP treat it as the float 2048.96875?

@iluuu1994
Copy link
Member

@alexdowad / doesn't do imprecise integer division, even if both operands are integers. Hence, 0xFFFF / 32 results in a float. https://3v4l.org/6oTp4#v8.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants