Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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?

Replies are listed 'Best First'.
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
Re^3: Has anyone attempted to create a PHP to Perl converter?
by Anonymous Monk on Nov 13, 2013 at 10:07 UTC

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 about the Monastery: (5)
As of 2016-06-30 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (396 votes). Check out past polls.