note 9078 modified in function.wddx-deserialize by felipe

From: Date: Mon, 21 Jul 2008 01:55:25 +0000
Subject: note 9078 modified in function.wddx-deserialize by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142399@lists.php.net to get a copy of this message
You can also serialize instantiated class objects with the wddx functions. ie. <?php $packet_id = wddx_packet_start("PHP"); wddx_add_vars($packet_id, "objvar"); $packet = wddx_packet_end($packet_id); $a = wddx_deserialize($packet); $obj = $a[objvar]; ?> now $obj is a useable object, that looks like the original. Note that with this method, you need to know what the variable name of the original object was. You can use one of the array functions to get the object in the event that the original object's variable name was unknown. *** only verified on linux with 4.0.2 --was-- You can also serialize instantiated class objects with the wddx functions. ie. $packet_id = wddx_packet_start("PHP"); wddx_add_vars($packet_id, "objvar"); $packet = wddx_packet_end($packet_id); $a = wddx_deserialize($packet); $obj = $a[objvar]; now $obj is a useable object, that looks like the original. Note that with this method, you need to know what the variable name of the original object was. You can use one of the array functions to get the object in the event that the original object's variable name was unknown. *** only verified on linux with 4.0.2 http://php.net/manual/en/function.wddx-deserialize.php

« previous php.notes (#142399) next »