Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Has anyone attempted to create a PHP to Perl converter?

by morgon (Deacon)
on Nov 13, 2013 at 09:58 UTC ( #1062363=note: print w/ replies, xml ) Need Help??


in reply to Re: Has anyone attempted to create a PHP to Perl converter?
in thread Has anyone attempted to create a PHP to Perl converter?

But with that approach you could only deal with pure PHP.

Do you see a way to deal with PHP-extensions written in C?

I don't know much about either PHP nor XS but I would assume that without at least some database-module etc (probably written in C) such a port would not have much practical value and making a PHP-extension callable from Perl must be difficult or am I wrong?


Comment on Re^2: Has anyone attempted to create a PHP to Perl converter?
Re^3: Has anyone attempted to create a PHP to Perl converter?
by Anonymous Monk on Nov 13, 2013 at 10:07 UTC
Re^3: Has anyone attempted to create a PHP to Perl converter?
by tobyink (Abbot) on Nov 13, 2013 at 11:11 UTC

    Most PHP extensions either dump a bunch of functions into the global namespace, or define a few classes.

    So to implement a PHP extension, you'd simply dump a few Perl or XS functions into the "PHP::GLOBAL" namespace, or define a few Perl classes

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062363]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-07-02 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls