php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58647 Combine print and get
Submitted: 2009-04-24 21:57 UTC Modified: 2009-04-25 12:59 UTC
From: phpbugs at delinked dot net Assigned:
Status: Wont fix Package: memcached (PECL)
PHP Version: 5.3.0RC1 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbugs at delinked dot net
New email:
PHP Version: OS:

 

 [2009-04-24 21:57 UTC] phpbugs at delinked dot net
Description:
------------
Requesting some sort of feature to combine PHP's print/echo with pecl-memcached's get (and associated functions) so as to avoid the need to store data in PHP's memory which is not going to be processed by code other than to output. The function should perhaps return false to indicate that the key did not exist, and a numeric length of printed data otherwise. Could be coupled with a function to get just the data length, and another returning just a boolean to indicate existence of a key at request time. However, not sure if those need to go into a new feature request.

Reproduce code:
---------------
$m = new Memcached();
$m->addServer('192.168.1.204',11211);

$len = $m->getPrint('key');
if ($len === false) {
...
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-25 12:59 UTC] andrei@php.net
The data still needs to be stored in memory, whether it's just for printing or other functionality.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC