Doc #61344 [NEW]: Failure Callback Parameters
| From: | adam at adamhahn dot com | Date: | Sat, 10 Mar 2012 16:25:23 +0000 |
| Subject: | Doc #61344 [NEW]: Failure Callback Parameters | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-8044@lists.php.net to get a copy of this message | ||
From:
Operating system: CentOS 5.7
PHP version: 5.3.10
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Failure Callback Parameters
Description:
------------
---
From manual page:
http://www.php.net/memcache.addserver#refsect1-memcache.addserver-parameters
---
The failure callback function for memcache::addServer is passed more than
just the two parameters listed within the documentation.
In addition to passing the hostname and port, three additional callback
parameters are passed.
There is a user submitted note regarding this (jwatte at imvu dot com
08-Sep-2011 06:02) however it seems that the note has the last two
parameters switched.
Test script:
---------------
$memcache = new Memcache();
$callback = function() {
print_r(func_get_args());
die();
};
// localhost memcache is offline/stopped
$memcache->addServer('localhost', 11211, false, 5, 1, 15, true,
$callback);
$memcache->set('foo', 'bar');
Expected result:
----------------
According to the existing documentation
Array
(
[0] => localhost
[1] => 11211
)
Actual result:
--------------
Array
(
[0] => localhost
[1] => 11211
[2] => 0
[3] => Connection refused
[4] => 111
)
--
Edit bug report at https://bugs.php.net/bug.php?id=61344&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61344&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61344&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61344&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61344&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61344&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61344&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61344&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61344&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61344&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61344&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61344&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61344&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61344&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61344&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61344&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61344&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61344&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61344&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61344&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61344&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61344&r=mysqlcfg