Unmarshal object with PHP

Discussion in 'Ruby' started by drogus@gmail.com, Aug 20, 2007.

  1. Guest

    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
     
    , Aug 20, 2007
    #1
    1. Advertising

  2. Eric Hodel Guest

    On Aug 19, 2007, at 16:24, 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? :) (I can't figure out what's going on in C files from ruby
    > core ;-)


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

    --
    Poor workers blame their tools. Good workers build better tools. The
    best workers get their tools to do the work for them. -- Syndicate Wars
     
    Eric Hodel, Aug 20, 2007
    #2
    1. Advertising

  3. 2007/8/20, <>:
    > 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 ;-)


    If you can switch formats, YAML might be easier:

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

    Kind regards

    robert
     
    Robert Klemme, Aug 20, 2007
    #3
  4. Thanks for replies :)

    On Aug 20, 3:30 am, Eric Hodel <> wrote:
    > http://www.aagh.net/projects/ruby-php-serialize
    >


    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.... :]
     
    Piotr Sarnacki, Aug 20, 2007
    #4
  5. Eric Hodel Guest

    On Aug 20, 2007, at 05:45, Piotr Sarnacki wrote:
    > Thanks for replies :)
    >
    > On Aug 20, 3:30 am, Eric Hodel <> wrote:
    >> http://www.aagh.net/projects/ruby-php-serialize
    >>

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

    --
    Poor workers blame their tools. Good workers build better tools. The
    best workers get their tools to do the work for them. -- Syndicate Wars
     
    Eric Hodel, Aug 20, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Serge Corbucci
    Replies:
    0
    Views:
    485
    Serge Corbucci
    Jan 14, 2004
  2. crash.test.dummy

    unmarshal XML from String using CastorXML

    crash.test.dummy, Jan 29, 2006, in forum: Java
    Replies:
    2
    Views:
    5,084
    crash.test.dummy
    Jan 30, 2006
  3. leo

    marshal and unmarshal

    leo, Aug 26, 2006, in forum: Python
    Replies:
    1
    Views:
    344
    Fredrik Lundh
    Aug 27, 2006
  4. Dmitri Fedoruk
    Replies:
    4
    Views:
    699
    Dmitri Fedoruk
    Sep 14, 2007
  5. Rajive Narain
    Replies:
    0
    Views:
    1,942
    Rajive Narain
    Sep 18, 2009
Loading...

Share This Page