Can you properly integrate PHP and Perl?

Discussion in 'Perl' started by Sarah E. Green, Aug 9, 2003.

  1. I'm well familiar with both PHP and Perl

    Let's say you've written, or have access to, a nice set of PHP modules or
    functions which allow you to write general applications very quickly.
    (As an example, to quickly bring up general and uniform web pages which
    can be used to quickly enter data into a back-end database).

    Now you switch companies and their environment uses entirely Perl.
    Obviously, people there have been writing their own Perl modules there
    for years which are used to interface to the various databases and
    other systems they have there.

    Is there anything that allows one to 'mix' Perl and PHP in the same
    subroutines, etc, and thus allowing one to use whichever is more
    appropriate for each subtask?

    Something perhaps like
    <?php
    $phpvariable=<?perl &perlsubroutine('a',34) ?> ;
    ?>
    or even vice versa I guess.

    Heh :)
    I'm almost certain that I'm being totally delusional here, but I thought
    I'd ask - you never know, some third-party product might exist to do
    this.

    I guess I'm going to have to do it the hard way, and try to, say, have
    Perl as the front-end, and have it use system() or `` (backticks) to
    try to call any of my back-end PHP programs as necessary?
    Sarah E. Green, Aug 9, 2003
    #1
    1. Advertising

  2. (Sarah E. Green) wrote
    in message news:<3f3528a1$>...
    >
    > Is there anything that allows one to 'mix' Perl and PHP in the same
    > subroutines, etc, and thus allowing one to use whichever is more
    > appropriate for each subtask?

    ....
    > I guess I'm going to have to do it the hard way, and try to, say, have
    > Perl as the front-end, and have it use system() or `` (backticks) to
    > try to call any of my back-end PHP programs as necessary?


    For things that do not require exchanging data between two groups
    of scripts, this may actually work quite well. If you do need the
    exchange, you might want to write a SOAP-based interface between
    the two groups, so that they can call each other at will. You will
    end up with two Web services, one with a Perl-based provider, which
    PHP scripts will call, and the other with a PHP-based provider, which
    Perl scripts will call. There may be a performance penalty though...

    Cheers,
    NC
    Nikolai Chuvakhin, Aug 10, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rajive Narain
    Replies:
    0
    Views:
    1,668
    Rajive Narain
    Sep 18, 2009
  2. neha shena
    Replies:
    1
    Views:
    254
    Dennis Lee Bieber
    Oct 29, 2010
  3. Ignoramus6539
    Replies:
    2
    Views:
    203
    Colin McKinnon
    Aug 30, 2006
  4. lala4life
    Replies:
    19
    Views:
    163
    Josef Moellers
    Feb 8, 2007
  5. M. Strobel
    Replies:
    1
    Views:
    217
    The Natural Philosopher
    Mar 5, 2013
Loading...

Share This Page