suaveant has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use PHP::Interpreter to access a php lib from Perl and having some issues.

I am able to instantiate a new php obj:

my $obj = $php->instantiate('MDG_ApplicationLogin');
but when I try to pass that object to another object:
my $ctx = $php->instantiate('MDG_Context',$obj);
I get Fatal error: Exception thrown without a stack frame in Unknown on line 0

I assume this has something to do with the translations, anyone know of a solution?

                - Ant
                - Some of my best work - (1 2 3)

Replies are listed 'Best First'.
Re: Passing PHP objs to PHP instantiate with PHP::Interpreter
by cdarke (Prior) on Apr 16, 2010 at 08:31 UTC
    Probably a problem with the php exception handler, in particular in getting a second exception after trying to handle an exception. See the PHP manual for set_exception_handler(), in particular the user contributed notes.
      Thanks, but I think the root of the problem is that when I pas an object to a call PHP::Interpreter isn't turning it back into a PHP object properly, I did a little test and I seem to get a string with the object name instead of an object.

                      - Ant
                      - Some of my best work - (1 2 3)