note 23853 added to ref.wddx

From: Date: Tue, 30 Jul 2002 11:02:45 +0000
Subject: note 23853 added to ref.wddx
Groups: php.notes 
Request: Send a blank email to php-notes+get-33982@lists.php.net to get a copy of this message
With ref to the above comment about typing, I have found that -- oddly enough -- PHP's WDDX supports the following WDDX types: null, boolean (true/false), number and string, *but* not date-time. as an example, use the following values in an array that you then serialize: $number = 5, $null = NULL, $bool = true, $string = 'this is a string'. they will all serialize correctly, e.g. the third entry comes out as: <var name='bool'><boolean value='true'/></var> i have tried with the 'official' format for WDDX 'datetime', e.g. '1998-9-15T09:05:32+4:0' (from the DTD @ http://www.openwddx.org/downloads/dtd/wddx_dtd_10.txt) but have only succeeded in getting this encoded as a 'string' type. if anyone else has any more information on this, it would be welcome. i would like to store the variables in 'appropriate' fields in a database, and the fact that only datetime is not supported is slightly irritating -- otherwise it would be a very useful function. -- http://www.php.net/manual/en/ref.wddx.php http://master.php.net/manage/user-notes.php?action=edit+23853 http://master.php.net/manage/user-notes.php?action=delete+23853 http://master.php.net/manage/user-notes.php?action=reject+23853

« previous php.notes (#33982) next »