Skip to content

Hash functions are considered impure. #12048

@xPaw

Description

@xPaw

Bug report

Methods such as sha256, hash, hash_hmac return same values given same inputs.

I also noticed it's reporting hash/hash_hmac call as impure, but says "call to function sha256()" (the first argumented to hash)

Code snippet that reproduces the problem

https://phpstan.org/r/b5c484eb-6682-419a-b523-3f05eef2776a

Expected output

No impure errors.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions