|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-03-29 10:22 UTC] krakjoe@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: krakjoe
[2016-03-29 10:23 UTC] krakjoe@php.net
-Assigned To: krakjoe
+Assigned To:
[2016-03-29 10:28 UTC] krakjoe@php.net
-Status: Verified
+Status: Open
-Type: Bug
+Type: Documentation Problem
[2016-03-29 10:28 UTC] krakjoe@php.net
[2016-03-29 10:29 UTC] krakjoe@php.net
-Summary: wrong error for SplFixedArray
+Summary: Incorrect Documentation for SplFixedArray::fromArray
[2016-03-29 11:08 UTC] dmitry@php.net
[2016-03-29 12:59 UTC] krakjoe@php.net
[2016-03-29 13:07 UTC] krakjoe@php.net
[2018-06-16 17:13 UTC] cmb@php.net
-Summary: Incorrect Documentation for SplFixedArray::fromArray
+Summary: wrong error for SplFixedArray
-Status: Open
+Status: Verified
-Type: Documentation Problem
+Type: Bug
[2018-06-16 17:13 UTC] cmb@php.net
[2018-06-16 17:34 UTC] nikic@php.net
[2019-12-06 14:55 UTC] nikic@php.net
[2020-06-25 08:04 UTC] nikic@php.net
-Status: Verified
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2020-06-25 08:04 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
Description: ------------ When extending the SplFixedArray overriding fromArray() method, PHP shows incorrect error text. The correct interface of a fromArray method is public static function fromArray($array, $save_indexes = true) without array typehint. Test script: --------------- class Collection extends \SplFixedArray { public static function fromArray(array $array, $save_indexes = true) { } } Collection::fromArray([]); Expected result: ---------------- no error Actual result: -------------- Warning: Declaration of Collection::fromArray(array $array, $save_indexes = true) should be compatible with SplFixedArray::fromArray($data, $save_indexes = NULL) in test.php on line 12