|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesphp-5-3-splfixedarray-fromarray-should-return-call-scope-instance (last revision 2011-07-26 09:57 UTC by laruence@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-26 05:35 UTC] laruence@php.net
[2011-07-26 05:36 UTC] laruence@php.net
-Status: Open
+Status: Verified
[2011-07-26 05:36 UTC] laruence@php.net
-Status: Verified
+Status: Analyzed
[2011-07-26 08:36 UTC] cataphract@php.net
[2011-07-26 09:49 UTC] laruence@php.net
[2011-07-26 09:57 UTC] laruence@php.net
[2011-07-26 10:10 UTC] laruence@php.net
[2011-07-27 05:40 UTC] ar at ez dot no
[2013-02-05 16:38 UTC] levim@php.net
[2013-02-05 16:38 UTC] levim@php.net
-Status: Analyzed
+Status: Wont fix
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 14 21:00:01 2025 UTC |
Description: ------------ It would be nice if SplFixedArray::fromArray() returned the child class instance instead of SplFixedArray instance. Test script: --------------- class FixedCollection extends SplFixedArray { // impl } $collection = FixedCollection::fromArray( array( 22, 42 ) ); if ( 'FixedCollection' !== get_class( $collection ) ) trigger_error( "fromArray() does not use 'new static'" ) Expected result: ---------------- I would have expected that function returned an instance of FixedCollection.