Bug #80210 [Opn->Nab]: SplFixedArray no longer has method rewind
| From: | nikic@php.net | Date: | Fri, 09 Oct 2020 14:32:03 +0000 |
| Subject: | Bug #80210 [Opn->Nab]: SplFixedArray no longer has method rewind | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229490@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
Updated by: nikic@php.net
Reported by: xigal18570 at jarilusua dot com
Summary: SplFixedArray no longer has method rewind
-Status: Open
+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:
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
Previous Comments:
------------------------------------------------------------------------
[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