Unmarshal object with PHP

Hi,

Is there any implamentation of something like Marshal.dump in PHP? Or
any implementation that is easily readable, so I could rewrite it into
PHP? :slight_smile: (I can't figure out what's going on in C files from ruby
core :wink:

Thanks,
Peter

What you need to figure out (or what you might need to tell us) is if you
mean you want to do some cross-language serialization based on Marshal, or
if you're just looking for a PHP *equivalent* of Marshal (but not
necessarily cross language compatible). Given the topic of this list, I'll
assume the former for now! Someone else might be able to help with an
implementation, but otherwise you might find this rather useful:

http://redhanded.hobix.com/inspect/theMarshWalker.html

Cheers,
Peter Cooper

路路路

On 8/20/07, drogus@gmail.com <drogus@gmail.com> wrote:

Hi,

Is there any implamentation of something like Marshal.dump in PHP? Or
any implementation that is easily readable, so I could rewrite it into
PHP? :slight_smile: (I can't figure out what's going on in C files from ruby
core :wink:

http://www.aagh.net/projects/ruby-php-serialize

路路路

On Aug 19, 2007, at 16:24, drogus@gmail.com wrote:

Is there any implamentation of something like Marshal.dump in PHP? Or
any implementation that is easily readable, so I could rewrite it into
PHP? :slight_smile: (I can't figure out what's going on in C files from ruby
core :wink:

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars

If you can switch formats, YAML might be easier:

http://www.google.com/search?q=yaml+php

Kind regards

robert

路路路

2007/8/20, drogus@gmail.com <drogus@gmail.com>:

Hi,

Is there any implamentation of something like Marshal.dump in PHP? Or
any implementation that is easily readable, so I could rewrite it into
PHP? :slight_smile: (I can't figure out what's going on in C files from ruby
core :wink:

Thanks for replies :slight_smile:

http://www.aagh.net/projects/ruby-php-serialize

I should specify more precisely :slight_smile: I need something like Ruby PHP
serializer, but "the other way". (PHP Ruby Marshalizer? :wink: )

Session data in Rails is marshaled and I want to read it in PHP
application to find out if user is logged in.

If you can switch formats, YAML might be easier:

Yes, YAML would be much easier :slight_smile: But as you see I can't use it.

If there is no easy way to do this I'd have to change session
behaviour a little bit.... :]

路路路

On Aug 20, 3:30 am, Eric Hodel <drbr...@segment7.net> wrote:

That's probably optimal. Porting Ruby's marshal format to PHP is going to take you longer than using PHP serialize instead of marshal on your session data.

路路路

On Aug 20, 2007, at 05:45, Piotr Sarnacki wrote:

Thanks for replies :slight_smile:

On Aug 20, 3:30 am, Eric Hodel <drbr...@segment7.net> wrote:

http://www.aagh.net/projects/ruby-php-serialize

I should specify more precisely :slight_smile: I need something like Ruby PHP
serializer, but "the other way". (PHP Ruby Marshalizer? :wink: )

Session data in Rails is marshaled and I want to read it in PHP
application to find out if user is logged in.

If there is no easy way to do this I'd have to change session
behaviour a little bit.... :]

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars