From f9c590a15d9c5c435d466a4aaae5dfad0673424c Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Fri, 15 Nov 2002 10:04:39 +0000 Subject: [PATCH] Added when unserialize_callback_func became available (4.2.0) which closes bug #16582. Also a few typos and additions. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@104162 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/var/functions/unserialize.xml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/reference/var/functions/unserialize.xml b/reference/var/functions/unserialize.xml index 4f92987b3c..fc9f11032c 100644 --- a/reference/var/functions/unserialize.xml +++ b/reference/var/functions/unserialize.xml @@ -1,5 +1,5 @@ - + @@ -23,14 +23,16 @@ In case the passed string is not unserializeable, &false; is returned. + unserialize_callback_func directive It's possible to set a callback-function which will be called, - if an undefined class should be instanciated during unserializing. + if an undefined class should be instantiated during unserializing. (to prevent getting an incomplete object "__PHP_Incomplete_Class".) Use your &php.ini;, ini_set or .htaccess-file - to define 'unserialize_callback_func'. - Everytime an undefined class should be instanciated, it'll be called. - To disable this feature just empty this setting. + to define 'unserialize_callback_func'. Everytime an undefined class + should be instantiated, it'll be called. To disable this feature just + empty this setting. Also note that the directive + unserialize_callback_func became available in PHP 4.2.0. @@ -38,14 +40,17 @@ unserialize_callback_func example ]]> @@ -65,6 +70,7 @@ function mycallback($classname) { <function>unserialize</function> example ]]>