Skip to content

Invalid error when checking return type of Memcached::getAllKeys() #1968

@ADmad

Description

@ADmad

Summary of a problem or a feature request

When using code similar to shown below phpstan generates error

Strict comparison using === between array and false will always evaluate to false

Code snippet that reproduces the problem

$m = new Memcached();
if ($m->getAllKeys() === false) {
	//
}

Expected output

No error should be reported since the method can return false on failure.

http://php.net/manual/en/memcached.getallkeys.php

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