Doc #70992 [Nab]: Wrong documentation

From: Date: Sun, 29 Nov 2015 12:16:01 +0000
Subject: Doc #70992 [Nab]: Wrong documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12891@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70992&edit=1 ID: 70992 Updated by: salathe@php.net Reported by: fekzol dot 13ker at gmail dot com Summary: Wrong documentation Status: Not a bug Type: Documentation Problem Package: memcache Operating System: Ubuntu 14.04 PHP Version: 5.6Git-2015-11-28 (snap) Block user comment: N Private report: N New Comment: Also, we have a page dedicated to Memcached expiration times: php.net/manual/en/memcached.expiration.php Previous Comments: ------------------------------------------------------------------------ [2015-11-29 02:32:48] requinix@php.net Both are acceptable to memcache: 300 is like a TTL while time()+300 is like an expiration. ------------------------------------------------------------------------ [2015-11-28 22:49:07] fekzol dot 13ker at gmail dot com Description: ------------ --- From manual page: http://www.php.net/memcached.set --- The exmaple code is wrong: /* expire 'object' key in 5 minutes */ $m->set('object', new stdclass, time() + 300); Test script: --------------- The example is wrong. $m->set('object', new stdclass, time() + 300); If you want to store the data for 5 minute, you have to do this: /* expire 'object' key in 5 minutes */ $m->set('object', new stdclass, 300); Not: time() + 300; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70992&edit=1

« previous php.doc.bugs (#12891) next »