Reading Serialized PHP Objects from Erlang

Richard Jones - RJ - September 28, 2008

I started writing some Erlang recently. The vast majority of data I need to access from Erlang resides in cached, serialized php objects. Here’s what I came up with to turn a serialized php object into a sort of nested Erlang proplist thing.

<?php


$s = array(123, ‘hello’, 3.14, array(‘a’=>‘foo’, ‘b’=>‘bar’));


print serialize($s);


?>

 

This gives:
a:4:{i:0;i:123;i:1;s:5:"hello";i:2;d:3.14;i:3;a:2:{s:1:"a";s:3:"foo";s:1:"b";s:3:"bar";}}
It’s not hard to [...]



Categories: Blogs  Richard Jones  

Comments

anonymous avatar

canon lens mugs
Nikon Mugs
Canon Coffee Lens Mug
Nikon Coffee Lens Mug
anon coffee mug,canon lens mug,canon mug,canon coffee cup,canon thermos travel mug
Canon 70-200mm Lens Coffee Mug
Canuydress.org/” >dresses
vvb

Posted by dress on 08 Sep 2010 at 09:39



 


Add comment

Name:

Email:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?