php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #41334 Enable serialization of DateTime objects
Submitted: 2007-05-08 21:33 UTC Modified: 2008-07-07 19:54 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: mail at philipp-wagner dot com Assigned: derick (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5.2.2 OS: all
Private report: No CVE-ID: None
 [2007-05-08 21:33 UTC] mail at philipp-wagner dot com
Description:
------------
As noted in bug #39821 and the documentation, DateTime objects cannot be serialized.
Still, serializing such objects would be of much use. I use these objects heavily, as well as serialize(). Currently I have to write a __destruct() method which saves the DateTime into a string object variable and read it back at __wakeup(). This causes much unnecessary work.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-07 19:54 UTC] derick@php.net
This has been implemented some time ago - for PHP 5.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 23 05:01:29 2024 UTC