Reading Serialized PHP Objects from Erlang
Richard Jones - RJ - September 28, 2008I 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
No comments so far, you could be the first.Add comment
Erlang on Twitter
» jamescarr (jamescarr): Working my way through “Learn you some erlang for great good!” tonight. http://t.co/DDTJwDJO
» bagus_erlang (bagus): Capek bngt nyanyi (kemesraan)
» AngginiMaulani (Δnggini MF): Kenapa mamah jdi ngomongin erlang gini:/
» wolfeidau (Mark Wolfe): Submitted update to the #erlang package on #OpenWRT http://t.co/4Brn63XU if anyone wants to test it please ping me /cc @ErlangEmbedded
» ivansyahhsn (ivansyah): Iya dewa erlang hbd,awas ya siksamu menanti RT @indrasan: selamat ulang tahun saudara reza erlang @rezasur semoga makin banyak proyek nya ya
» CzarneckiD (David Czarnecki): It was like Mr. Toad’s Wild Open Source Ride here tonight: Erlang, Riak, CouchDB, Ruby and Python. #nofastpassrequired
» yang_yihming (Yiming Yang): @vw009 Which language do you often use in parallel programing? Ocaml? Erlang? C01? Or some other language?
» tengkushara (T Muni Fahtu Zahra): RT @fathiaamandaaa: RT @indrasan: selamat ulang tahun saudara reza erlang @rezasur semoga makin banyak proyek nya ya.
» wolfeidau (Mark Wolfe): Coding in emacs and enjoying it, hell has frozen over.. #erlang #emacs
» bagus_erlang (bagus): SI rizky kocak ♓é² :.. ♓é² :.. ♓é² :..
Statistics
Number of aggregated posts: 10503
Number of comments: 2137
Most recent article: May 21, 2012
Latest comments
» Erno on 100,000 Lines of Assembly Language: Excellent posting. Undoubtedly you are an expert when it comes to this writing. This is absolutely the first time I…
» Jessica on 30 September 2011: Basho Technologies, Erlang Solutions and Trifork AS Announce Big Data and NoSQL R: yeah of course. I just thought that everything will be just alright and I want to have these kind of…
» DRS786 on 25 May 2012: Poznan Erlang User Group Event: I’m going!