This module provides a way to load a PHP interpreter into your Perl programs.
The PHP interpreter then automagically has access to all of the modules and
variables loaded into Perl. So PHP executed from Perl can use any Perl
modules.
PHP::Interpreter supports both PHP 5.0 and PHP 5.1. In PHP 5.1 you have the
possibility of instantiating multiple simultaneous PHP interpeters in a
single process. In PHP 5.0, the PHP interpreter is effectively a singleton.
- Download the PHP sources from php.net
- tar zxf php-5.0.x.tar.gz
- cd php-5.0.x
- ./configure --enable-embed [any other options you want]
- make
- make install
- install PHP::Interpreter
- ...
- profit!
- Download the PHP sources from php.net
- tar zxf php-5.1.x.tar.gz
- cd php-5.1.x
- ./configure --enable-embed [any other options you want]
- make
- make install
- install PHP::Interpreter
- ...
- profit!
- Download the PHP sources from php.net
- tar zxf php-5.1.x.tar.gz
- cd php-5.1.x
- ./configure --enable-embed --enable-maintainer-zts [any other options you want]
- make
- make install
- install PHP::Interpreter
- ...
- profit!
The two best methods are:
1) perldoc PHP::Interpreter
2) read the tests in t/*.t