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
Votes:1
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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 09 14:01:30 2024 UTC