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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
39 - 39 = ?
Subscribe to this entry?

 
 [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 26 16:01:29 2024 UTC