php.net |  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
Votes:1
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.
Password:
Status:
Package:
Bug Type:
Summary:
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
Description:
------------
The SplFixedArray implementation doesn't have a __set_state() function, and as such var_export() creates code which does not function. 

Test script:
---------------
var_export(SplFixedArray::fromArray([1,2,3]));



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

Actual result:
--------------
Syntax error in exported code.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-13 20:43 UTC] carusogabriel34 at gmail dot com
Couldn't reproduce https://3v4l.org/QrqN0
 [2018-02-13 21:07 UTC] nikic@php.net
-Type: Bug +Type: Feature/Change Request
 [2018-02-13 21:07 UTC] nikic@php.net
@carusogabriel34: The code generation works, but running the code doesn't, as SplFixedArray does not implement __set_state(): https://3v4l.org/50QD3
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 03:01:30 2019 UTC