From 0a45b3310f7549655aa0c915afc01c9d85ae74e3 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Wed, 20 Oct 2010 06:52:32 +0000 Subject: [PATCH] Fixed bug #50793 (Note about not being able to serialize internal objects needs clarifiaction) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@304536 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/var/functions/serialize.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reference/var/functions/serialize.xml b/reference/var/functions/serialize.xml index c546c8f80d..f58c5b800d 100644 --- a/reference/var/functions/serialize.xml +++ b/reference/var/functions/serialize.xml @@ -127,7 +127,16 @@ if (!odbc_execute($stmt, $sqldata)) { &reftitle.notes; - It is not possible to serialize PHP built-in objects. + Note that many built-in PHP objects cannot be serialized. However those with + the ability either implement the Serializable or the + magic __sleep and __wakeup methods. If an + internal class doesn't forfill any of those requirements, it cannot reliably be + serialized. + + + There are some historical exceptions to the above rule, where some internal objects + could be serialized without implementing the interface or exposing the methods. Notable + is the ArrayObject prior to PHP 5.2.0.