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 (Canon) 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