PHP strange issue with memcache

Posted by Industrial on Stack Overflow See other posts from Stack Overflow or by Industrial
Published on 2010-05-22T12:20:25Z Indexed on 2010/05/22 12:30 UTC
Read the original article Hit count: 131

Filed under:
|
|
|

Hi everyone,

I am testing out some memcache code here in PHP:

1:

$testInstance = new Memcache;
$var = @$testInstance->connect('localhost', 11211);
echo $var;
// Outputs true no matter if the memcached is running or not.

2:

$testInstance = new Memcache;
$var = @$testInstance->connect('blablabla', 11211);
echo $var;
// Outputs false

Why on earth is this occuring? I am running WinXP in my development environment and I cant see how the localhost version always returns true no matter if the memcached is running or not.

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about error