--TEST-- memcache_flush() --SKIPIF-- --FILE-- addServer($nonExistingHost, $nonExistingPort); $result = @memcache_flush($memcache2); var_dump($result); memcache_close($memcache); var_dump(memcache_flush($memcache)); try { var_dump(memcache_flush(new stdClass)); } catch (TypeError $e) { echo "{$e->getMessage()}\n"; } try { var_dump(memcache_flush('')); } catch (TypeError $e) { echo "{$e->getMessage()}\n"; } echo "Done\n"; ?> --EXPECTF-- bool(true) bool(false) bool(false) bool(true) memcache_flush(): Argument #1 ($memcache) must be of type MemcachePool, stdClass given memcache_flush(): Argument #1 ($memcache) must be of type MemcachePool, string given Done