pconnect() put error message to stderr if connection failed. This behavior may cause unexpected output.
use '@' infrom of `pconnect()` to avoid it.
<?php
$cache = new Memcache();
$stat = @$cache->pconnect('localhost', 11211);
if (false === $stat) {
// connect failed
}
// connect success