php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #40344 lack of information for __sleep
Submitted: 2007-02-03 17:12 UTC Modified: 2007-03-24 08:26 UTC
From: christian at enovo dot dk Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: FreeBSD 6.0
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: christian at enovo dot dk
New email:
PHP Version: OS:

 

 [2007-02-03 17:12 UTC] christian at enovo dot dk
Description:
------------
http://dk2.php.net/manual/en/language.oop5.magic.php

"Example 19.27. Sleep and wakeup"

doesnt return anything from __sleep() - so it should serialize NULL 

(17:59:19) (@Derick) have a __sleep() method?
(17:59:46) (Jippi) yep
(18:00:01) (@Derick) there you go
(18:00:11) (@Derick) you need to return an array from that
(18:00:20) (@Derick) with which properties should be in the serialized array
(18:00:28) (@Derick) if not, I think it doens't serialize it
(18:01:02) (@Derick) heh "Example 1258" isn't very useful :)
(18:01:13) (Jippi) ah, works
(18:02:15) (Jippi) http://dk2.php.net/manual/en/language.oop5.magic.php Example 19.27 doesnt mention anything about returning anything in class Connection though ?
(18:02:17) (@Derick) the docs should mention this though, I suggest to file a doc feature request for "http://no2.php.net/manual/en/language.oop5.magic.php"
(18:02:22) (@Derick) right


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-03 18:03 UTC] didou@php.net
Please help up by being more verbose. What sentence do you feel needs to be added in the documentation?
 [2007-02-03 23:03 UTC] derick@php.net
For example that it doesn't mention that the object is serialized as "NULL" when you don't return anything from __sleep().
 [2007-02-11 01:00 UTC] phpdoc at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-03-24 08:26 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"If the method doesn't return anything then NULL is serialized and E_NOTICE is issued." Example fixed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 14:01:31 2025 UTC