Memcached::setOptions

Set Memcached options

&reftitle.description; public `bool` `Memcached::setOptions` `array` `options`

`Memcached::setOptions` is a variation of the `Memcached::setOption` that takes an array of options to be set.

&reftitle.parameters;

`options`

- An associative array of options where the key is the option to set and the value is the new value for the option.

&reftitle.returnvalues;

&return.success;

&reftitle.examples;

### Setting Memcached options

    <?php
    $m = new Memcached();
    var_dump($m->getOption(Memcached::OPT_HASH) == Memcached::HASH_DEFAULT);

    $m->setOptions(array(Memcached::OPT_HASH => Memcached::HASH_MURMUR, Memcached::OPT_PREFIX_KEY => "widgets"));

    var_dump($m->getOption(Memcached::OPT_HASH) == Memcached::HASH_DEFAULT);
    echo "Prefix key is now: ", $m->getOption(Memcached::OPT_PREFIX_KEY), "\n";
    ?>

&example.outputs;

    bool(true)
    bool(false)
    Prefix key is now: widgets

&reftitle.seealso;

- `Memcached::getOption`
- `Memcached::setOption`
- Memcached Constants