|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74891 [PECL ds] Ds\Pair::clear doesn't exist
Submitted: 2017-07-10 11:39 UTC Modified: 2017-07-10 15:10 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ruzic dot marko at gmail dot com Assigned:
Status: Verified Package: Unknown/Other Function
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
33 + 16 = ?
Subscribe to this entry?

 [2017-07-10 11:39 UTC] ruzic dot marko at gmail dot com
From manual page:
It appears that there is an error in docs example.

Seems illogical that 
$pair = new \Ds\Pair("a", 1);

will output

Ds\Pair Object
    [0] => 1
    [1] => 2
    [2] => 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-10 15:10 UTC]
-Summary: Possible error in docs +Summary: [PECL ds] Ds\Pair::clear doesn't exist -Status: Open +Status: Verified -Package: Documentation problem +Package: Unknown/Other Function
 [2017-07-10 15:11 UTC]
Looks like a copy/paste from the Ds\Vector::clear docs.

But Ds\Pair does not have a "clear" method in the first place.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 15:01:29 2024 UTC