Doc #64190 [Opn->Csd]: Missing ']' under Examples section in memcache.setOptions
| From: | salathe@php.net | Date: | Sat, 02 Mar 2013 14:30:24 +0000 |
| Subject: | Doc #64190 [Opn->Csd]: Missing ']' under Examples section in memcache.setOptions | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9608@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64190&edit=1
ID: 64190
Updated by: salathe@php.net
Reported by: grim dot crunch at gmail dot com
Summary: Missing ']' under Examples section in
memcache.setOptions
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: N/A
PHP Version: Irrelevant
-Assigned To:
+Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2013-03-02 14:28:59] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=329615
Log: fix example syntax error (doc #64190)
------------------------------------------------------------------------
[2013-02-11 16:37:21] grim dot crunch at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=64190&edit=1