Doc #64190 [NEW]: Missing ']' under Examples section in memcache.setOptions

From: Date: Mon, 11 Feb 2013 16:37:21 +0000
Subject: Doc #64190 [NEW]: Missing ']' under Examples section in memcache.setOptions
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9513@lists.php.net to get a copy of this message
From: grim dot crunch at gmail dot com Operating system: N/A PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Missing ']' under Examples section in memcache.setOptions Description: ------------ --- From manual page: http://www.php.net/memcached.setoptions --- <?php $m = new Memcached(); var_dump($m->getOption(Memcached::OPT_HASH) == Memcached::HASH_DEFAULT); $m->setOptions([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"; ?> Test script: --------------- Should read: <?php $m = new Memcached(); var_dump($m->getOption(Memcached::OPT_HASH) == Memcached::HASH_DEFAULT); $m->setOptions([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"; ?> Expected result: ---------------- As seen and expected from the documentation: $ php /path/to/example.php bool(true) bool(false) Prefix key is now: widgets $ Actual result: -------------- $ php /path/to/example.php PHP Parse error: syntax error, unexpected ')', expecting ']' in /path/to/example.php on line 5 Parse error: syntax error, unexpected ')', expecting ']' in /path/to/example.php on line 5 $ -- Edit bug report at https://bugs.php.net/bug.php?id=64190&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64190&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64190&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64190&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64190&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64190&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64190&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64190&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64190&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64190&r=support Expected behavior: https://bugs.php.net/fix.php?id=64190&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64190&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64190&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64190&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64190&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64190&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64190&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64190&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64190&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64190&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64190&r=mysqlcfg

« previous php.doc.bugs (#9513) next »