10.02.2013 Views

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PHP</strong>/Java Bridge 172<br />

<strong>PHP</strong>/ Java Bridge<br />

There are three well known implementations of the <strong>PHP</strong> scripting language:<br />

• The original implementation of <strong>PHP</strong> and the de facto standard is the open source <strong>PHP</strong> distribution.<br />

• Project Zero has a <strong>PHP</strong> runtime written in Java. It also distributes extensions from the open source<br />

implementation of <strong>PHP</strong>.<br />

• Quercus is an open-source pure Java implementation of the <strong>PHP</strong> scripting language.<br />

To bridge between <strong>PHP</strong> scripts and Java libraries all three implementations provide a <strong>PHP</strong>/Java bridge.<br />

The de facto implementation of <strong>PHP</strong> has a <strong>PHP</strong>/Java Bridge separately available from SourceForge. This uses a dual<br />

process model where the Java libraries are run in a separate process from the <strong>PHP</strong> runtime. Interactions with Java<br />

objects are marshalled across to the Java process using an XML [1] protocol.<br />

Quercus and Project Zero implement <strong>PHP</strong> on top of the Java Virtual Machine and so can run the Java libraries in the<br />

same process as the <strong>PHP</strong> runtime. This reduces the overhead of interacting with Java libraries when compared with<br />

the dual process model.<br />

See also<br />

• Quercus (software)<br />

External links<br />

• Open source <strong>PHP</strong> homepage [2]<br />

• SourceForge <strong>PHP</strong>/Java Bridge homepage [3]<br />

• Project Zero homepage [4]<br />

• Quercus homepage [5]<br />

References<br />

[1] http:/ / php-java-bridge. sourceforge. net/ pjb/ PROTOCOL. TXT<br />

[2] http:/ / www. php. net/<br />

[3] http:/ / php-java-bridge. sourceforge. net/<br />

[4] http:/ / www. projectzero. org/ documentation/<br />

[5] http:/ / quercus. caucho. com/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!