Skip to content

Division on number range loses information about range #5731

@simPod

Description

@simPod

Bug report

https://phpstan.org/r/2be07ee1-1435-4ea3-a764-e5fcde1d3759

int<0,max> / int<0,max> results in float|int while it should result float<0,max>|int<0,max>

Code snippet that reproduces the problem

This e.g. prevents dynamic computation of count for array_fill https://phpstan.org/r/c2b62fff-9421-4a3b-9a67-a99736376367

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions