php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80210 SplFixedArray no longer has method rewind
Submitted: 2020-10-09 14:29 UTC Modified: 2020-10-09 14:32 UTC
From: xigal18570 at jarilusua dot com Assigned:
Status: Not a bug Package: SPL related
PHP Version: 8.0.0rc1 OS: linux
Private report: No CVE-ID: None
 [2020-10-09 14:29 UTC] xigal18570 at jarilusua dot com
Description:
------------
Using docker image php:8.0.0rc1-fpm-alpine3.12;

```
Fatal error: Uncaught Error: Call to undefined method SplFixedArray::rewind() in /app/test.php:4
Stack trace:
#0 {main}
  thrown in /app/test.php on line 4
```

Not sure if removed by design in PHP8, but it is not in the docs.

Test script:
---------------
```
<?php

$foo = new \SplFixedArray();
$foo->rewind();
```



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-09 14:32 UTC] nikic@php.net
-Status: Open +Status: Not a bug
 [2020-10-09 14:32 UTC] nikic@php.net
SplFixedArray no longer implements Iterator in PHP 8. You can acquire an iterator using $array->getIterator().

The documentation is not yet update for PHP 8.0, but this is mentioned in the upgrading notes here: https://github.com/php/php-src/blob/e4e2541c1a90daf708ab1ee4d44f2ab2883ce84b/UPGRADING#L515-L520
 [2020-10-12 12:15 UTC] xigal18570 at jarilusua dot com
Thank you, I've missed the document, feel free to close this report as invalid :)
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 09 01:05:44 2022 UTC