php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81157 Wrong documentation for \Ds\Set::__construct
Submitted: 2021-06-17 14:55 UTC Modified: 2021-06-17 15:15 UTC
From: enumag at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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 !
Your email address:
MUST BE VALID
Solve the problem:
31 + 16 = ?
Subscribe to this entry?

 
 [2021-06-17 14:55 UTC] enumag at gmail dot com
Description:
------------
php.net/manual/en/ds-set.construct.php

The method is documented as:

public Ds\Set::__construct ( mixed ...$values )

But it is actually:

public Ds\Set::__construct ([ mixed $values ])

The php-ds polyfill has it correct: https://github.com/php-ds/polyfill/blob/5652e5870b20713ebe02182050df98aee5856d5b/src/Set.php#L37

I tried with the actual extension as well.

Also reported in the ds extension repo as I'm unsure who maintains the docs: https://github.com/php-ds/ext-ds/issues/167


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-17 15:15 UTC] cmb@php.net
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2021-06-17 15:33 UTC] git@php.net
Automatic comment on behalf of cmb69
Revision: https://github.com/php/doc-en/commit/9e3e335d2f2319d11323185445fe91fb40352fe9
Log: Fix #81157: Wrong documentation for \Ds\Set::__construct
 [2021-06-17 15:33 UTC] git@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 12:01:32 2024 UTC