Skip to content

[PHP7 Branch] Expire 0 no longer means "no expiration" #732

@steffenweber

Description

@steffenweber
<?php
$redis = new Redis();
$redis->connect('localhost');
$redis->set('key', 'value', 0);

Using PHP 5.6.17 and phpredis 2.2.7 this yields "SET" "key" "value". Fine.

But using PHP 7.0.2 and the current HEAD of the php7 branch the same code sends nothing to the Redis server (observed using redis-cli with the MONITOR command). I guess this is a bug because IMHO the old behaviour (0 meaning "no expiration") is more intuitive.

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