|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75268 SplFixedArray doesn't implement __set_state().
Submitted: 2017-09-27 15:07 UTC Modified: 2018-02-13 21:07 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: brad at hallnet dot co dot uk Assigned:
Status: Open Package: SPL related
PHP Version: 7.0.23 OS: Ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: brad at hallnet dot co dot uk
New email:
PHP Version: OS:


 [2017-09-27 15:07 UTC] brad at hallnet dot co dot uk
The SplFixedArray implementation doesn't have a __set_state() function, and as such var_export() creates code which does not function. 

Test script:

Expected result:
The SplFixedArray can be exported and the code functions correctly.

Actual result:
Syntax error in exported code.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-13 20:43 UTC] carusogabriel34 at gmail dot com
Couldn't reproduce
 [2018-02-13 21:07 UTC]
-Type: Bug +Type: Feature/Change Request
 [2018-02-13 21:07 UTC]
@carusogabriel34: The code generation works, but running the code doesn't, as SplFixedArray does not implement __set_state():
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Aug 13 03:01:29 2020 UTC