This is due to the way PHP handles objects: very very bad. Until version 5 is out, you should always & assign objects you create: $c =& new xmlrpc_client("/XMLRPC/server.php", "slate", 80); Otherwise the object gets created by 'new' and then duplicated (i.e. created again) by '='