Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Passing PHP objs to PHP instantiate with PHP::Interpreter

by suaveant (Parson)
on Apr 15, 2010 at 19:39 UTC ( [id://834958]=perlquestion: print w/replies, xml ) Need Help??

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)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://834958]
Approved by ikegami
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-06-13 22:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.