Unmarshal object with PHP

D

drogus

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? :) (I can't figure out what's going on in C files from ruby
core ;-)

Thanks,
Peter
 
P

Piotr Sarnacki

Thanks for replies :)


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

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 :) 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.... :]
 
E

Eric Hodel

Thanks for replies :)


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

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.... :]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top