Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 494f2c14be
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (26 sloc) 0.473 kB
--TEST--
Test that callback is invoked on new object
--SKIPIF--
<?php if (!extension_loaded("memcached")) print "skip"; ?>
--FILE--
<?php
function my_func(Memcached $obj, $persistent_id = null)
{
$obj->addServer("127.0.0.1", 11211);
}
$m = new Memcached('hi', 'my_func');
var_dump($m->getServerList());
echo "OK\n";
--EXPECT--
array(1) {
[0]=>
array(3) {
["host"]=>
string(9) "127.0.0.1"
["port"]=>
int(11211)
["weight"]=>
int(0)
}
}
OK
Jump to Line
Something went wrong with that request. Please try again.