diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-02-09 16:01:24 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-02-09 16:01:24 +0100 |
commit | c65efaa60905db2be99e1c298aaf826003693f5d (patch) | |
tree | 5010133d94ae941a5e102fa112d7b275ba17556a /skipif.inc | |
parent | c52f0a87b5c5ad2d581c201bcb9af100c8c3d49c (diff) |
php-pecl-memcached: test build
Diffstat (limited to 'skipif.inc')
-rw-r--r-- | skipif.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/skipif.inc b/skipif.inc new file mode 100644 index 0000000..9ef73b0 --- /dev/null +++ b/skipif.inc @@ -0,0 +1,16 @@ +<?php +if (!extension_loaded("memcached")) { + die("skip memcached is not loaded\n"); +} + +include dirname(__FILE__) . "/config.inc"; + +if (($m = memc_get_instance()) === NULL) { + die ("skip can not connect to server\n"); +} + +if (isset($min_version)) { + if (version_compare(memc_get_version($m), $min_version, "<")) { + die("skip version of server pool is too old, $min_version is required\n"); + } +} |