1--TEST--
2Test that callback is invoked on new object
3--SKIPIF--
4<?php include "skipif.inc";?>
5--FILE--
6<?php
7
8include dirname (__FILE__) . '/config.inc';
9
10function my_func(Memcached $obj, $persistent_id = null)
11{
12	$obj->addServer(MEMC_SERVER_HOST, MEMC_SERVER_PORT);
13}
14
15$m = new Memcached('hi', 'my_func');
16$m = new Memcached('hi', 'my_func');
17
18var_dump($m->getServerList());
19
20echo "OK\n";
21
22--EXPECTF--
23array(1) {
24  [0]=>
25  array(3) {
26    ["host"]=>
27    string(9) "%s"
28    ["port"]=>
29    int(%d)
30    ["type"]=>
31    string(3) "TCP"
32  }
33}
34OK
35