10.02.2013 Views

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Project Zero 262<br />

<strong>PHP</strong> support<br />

The <strong>PHP</strong> support in WebSphere sMash is provided by a <strong>PHP</strong> runtime implemented in Java. [2] . <strong>PHP</strong> scripts are<br />

compiled into Java bytecode which then run on the Java Virtual Machine (JVM). This is similar in concept to the<br />

approach taken by other projects such as JRuby and Jython, which run the Ruby and Python languages, respectively,<br />

against the JVM. Running on the JVM allows direct, same process calls between <strong>PHP</strong>, Java and Groovy code<br />

allowing applications to be assembled using a variety of languages.<br />

In contrast to the approach taken by Quercus, the other JVM based <strong>PHP</strong> implementation, sMash is able to re-use<br />

existing <strong>PHP</strong> extensions from <strong>PHP</strong>.net attaching them to the Java virtual machine via the Java Native Interface (JNI)<br />

and an API layer called XAPI-C.<br />

The runtime has a DBGp debug port allowing debug access from IDEs and debuggers which support the DBGp<br />

protocol such as the Eclipse PDT project.<br />

The <strong>PHP</strong> runtime does not have an identity outside of sMash so it is simply referred to as the "WebSphere sMash<br />

runtime for <strong>PHP</strong>."<br />

As of October 2008 WebSphere sMash is capable of running several well known <strong>PHP</strong> applications on a Java Virtual<br />

Machine. These include SugarCRM [3] , phpBB [4] , WordPress [5] and Mediawiki [6] .<br />

The <strong>PHP</strong> runtime supports close integration with the Java and Groovy languages through its Java/Groovy bridge.<br />

This allows <strong>PHP</strong> scripts to use libraries written in Java and Groovy through a lightweight and extremely fast interop<br />

layer. The Groovy bridge allows advanced features from Groovy to be accessed directly from <strong>PHP</strong>. Examples<br />

include closures and Groovy metaobjects.<br />

External links<br />

• OSS Developers: Project Zero Aims for Next-Gen Web Applications [7]<br />

• IBM WebSphere sMash V1.1.0 brings smart application development to businesses [8]<br />

References<br />

[1] "About Project Zero" (http:/ / www. projectzero. org/ about/ ). Project Zero Site. . Retrieved 2008-06-23.<br />

[2] "Project Zero <strong>PHP</strong> page" (http:/ / www. projectzero. org/ php). Project Zero <strong>PHP</strong> page. . Retrieved 2009-02-02.<br />

[3] "Smash4Sugar project at SugarForge" (http:/ / www. sugarforge. org/ projects/ sugar4smash). Smash 4 Sugar. . Retrieved 2008-06-30.<br />

[4] "PhpBB running on Project Zero" (http:/ / www. projectzero. org/ blog/ index. php/ 2008/ 01/ 13/ phpbb-running-on-project-zero/ ). phpBB on<br />

PZ. . Retrieved 2008-06-30.<br />

[5] "Try out <strong>PHP</strong> Application WordPress on sMash" (http:/ / www. projectzero. org/ blog/ index. php/ 2008/ 10/ 02/<br />

try-out-php-application-wordpress-on-smash/ ). WordPress on PZ. . Retrieved 2008-10-09.<br />

[6] "Try out <strong>PHP</strong> Application MediaWiki on sMash" (http:/ / www. projectzero. org/ blog/ index. php/ 2008/ 10/ 09/<br />

try-out-php-application-mediawiki-on-websphere-smash/ ). MediaWiki on PZ. . Retrieved 2008-10-19.<br />

[7] http:/ / ostatic. com/ 160611-blog/ oss-developers-project-zero-aims-for-next-gen-web-applications<br />

[8] http:/ / www-01. ibm. com/ common/ ssi/ index. wss?DocURL=http:/ / www-01. ibm. com/ common/ ssi/ rep_ca/ 7/ 897/ ENUS208-417/<br />

index. html& InfoType=AN& InfoSubType=CA& InfoDesc=Announcement%20Letters& panelurl=index. wss?&<br />

paneltext=Announcement%20letter%20search#h2-descx

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

Saved successfully!

Ooh no, something went wrong!