Both the XML and PHP output from Dream services contain the same data; the only difference is in the format. The documentation on OpenGarden assumes XML output. In general you can assume these rules:
By default all data exchanges with Dream services use XML. However, an XML response can be automatically converted to serialized PHP by using the dream.out.format=php parameter in the request URI:
http://dreamserver/stats/record/RESPONSE_TIME&dream.out.format=php
GET http://dreamserver/stats/record/stat1
<stat> <name>stat1</name> <source>http://localhost:8081/stats/record/stat1/</source> <service>http://localhost:8081/stats/</service> <min>0</min> <max>9.594</max> <avg>4.914</avg> <var>0.14535147392290246</var> <sum>49.14</sum> <count>10</count> <first>2006-05-17T00:26:36.6098976-07:00</first> <last>2006-05-17T00:42:27.4853392-07:00</last> <rate>95.08754416</rate> <ratevar>0.99909449928635941</ratevar> </stat>
GET http://dreamserver/stats/record/stat...out.format=php
a:1:{s:4:"stat";a:13:{s:4:"name";s:5:"stat1";s:6:"source";s:41:"http://localhost:8081/stats/record/stat1/";s:7:"service";s:28:"http://localhost:8081/stats/";s:3:"min";s:1:"0";s:3:"max";s:5:"9.594";s:7:"average";s:5:"4.914";s:8:"variance";s:19:"0.14535147392290246";s:3:"sum";s:5:"49.14";s:5:"count";s:2:"10";s:5:"first";s:33:"2006-05-17T00:26:36.6098976-07:00";s:4:"last";s:33:"2006-05-17T00:42:27.4853392-07:00";s:4:"rate";s:11:"95.08754416";s:7:"ratevar";s:19:"0.99909449928635941";}} The serialized PHP output can be converted into a PHP object by using the built-in unserialize() function.
Array( [stat] => Array( [name] => "stat1" [source] => "http://localhost:8081/stats/record/stat1/" [service] => "http://localhost:8081/stats/" [min] => "0" [max] => "9.594" [average] => "4.914" [variance] => "0.14535147392290246" [sum] => "49.14" [count] => "10" [first] => "2006-05-17T00:26:36.6098976-07:00" [last] => "2006-05-17T00:42:27.4853392-07:00" [rate] => "95.08754416" [ratevar] => "0.99909449928635941" ) )