Doc #74891 [Opn->Ver]: [PECL ds] Ds\Pair::clear doesn't exist
| From: | requinix@php.net | Date: | Mon, 10 Jul 2017 15:11:01 +0000 |
| Subject: | Doc #74891 [Opn->Ver]: [PECL ds] Ds\Pair::clear doesn't exist | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14827@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74891&edit=1
ID: 74891
Updated by: requinix@php.net
Reported by: ruzic dot marko at gmail dot com
-Summary: Possible error in docs
+Summary: [PECL ds] Ds\Pair::clear doesn't exist
-Status: Open
+Status: Verified
Type: Documentation Problem
-Package: Documentation problem
+Package: Unknown/Other Function
Operating System: any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Looks like a copy/paste from the Ds\Vector::clear docs.
But Ds\Pair does not have a "clear" method in the first place.
Previous Comments:
------------------------------------------------------------------------
[2017-07-10 11:39:11] ruzic dot marko at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/ds-pair.clear
---
It appears that there is an error in docs example.
Seems illogical that
$pair = new \Ds\Pair("a", 1);
print_r($pair);
will output
Ds\Pair Object
(
[0] => 1
[1] => 2
[2] => 3
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74891&edit=1