php.net |  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-07-10 11:39 UTC] 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
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-10 15:10 UTC] requinix@php.net
-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] requinix@php.net
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-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC