|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2019 The PHP Group
All rights reserved.
Last updated: Mon Oct 21 18:01:27 2019 UTC