Bug #80210 [Com]: SplFixedArray no longer has method rewind
| From: | xigal18570 at jarilusua dot com | Date: | Mon, 12 Oct 2020 12:15:14 +0000 |
| Subject: | Bug #80210 [Com]: SplFixedArray no longer has method rewind | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229570@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80210&edit=1
ID: 80210
Comment by: xigal18570 at jarilusua dot com
Reported by: xigal18570 at jarilusua dot com
Summary: SplFixedArray no longer has method rewind
Status: Not a bug
Type: Bug
Package: SPL related
Operating System: linux
PHP Version: 8.0.0rc1
Block user comment: N
Private report: N
New Comment:
Thank you, I've missed the document, feel free to close this report as invalid :)
Previous Comments:
------------------------------------------------------------------------
[2020-10-09 14:32:03] 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-09 14:29:11] 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();
```
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80210&edit=1