5

What PHP ↔ Perl interface or bindings do you recommend?

I need to be able to run Perl functions located in a Perl file from a PHP script and get the return values.

I've already found the PECL "perl" package but I'm not sure how reliable it is since the last Subversion activity was ~12 months ago.

I've also found the Perl module PHP::Interpreter that is supposed to work both ways according to an almost 3 year old tutorial, Integrating PHP and Perl.

I would really appreciate it if you can recommend (or not) either of those 2 options or if you've got a better option that I haven't seen yet.

daxim
  • 39,270
  • 4
  • 65
  • 132
  • 1
    http://stackoverflow.com/questions/1030736/how-can-i-use-perl-libraries-from-php http://stackoverflow.com/questions/2635612/how-to-include-pl-perl-file-in-php http://stackoverflow.com/questions/4276654/perl-interpreter-for-php – daxim Nov 29 '10 at 12:36
  • Not sure which answer to choose as the "right" one. Both link to similar tools (I knew of and have used Thrift before). What to do? :-) – Kristinn Örn Sigurðsson Dec 18 '10 at 02:03

2 Answers2

5

Never used any of those, but they look interesting..

Take a look at Gearman as well.. more overhead in systems like these but you get other cool stuff :) Guess it depends on your needs ..

Øyvind Skaar
  • 2,278
  • 15
  • 15
4

Your best bet would probably be Thrift. It connects those languages (and a lot more) between each other. The only downside is requiring a network server to run and receive those requests on either side.

Tim Dorr
  • 4,861
  • 2
  • 21
  • 24