Project Zero - PHP Support

PHP Support

The PHP support in WebSphere sMash is provided by a PHP runtime implemented in Java. PHP scripts are compiled into Java bytecode which then run on the Java Virtual Machine (JVM). This is similar in concept to the approach taken by other projects such as JRuby and Jython, which run the Ruby and Python languages, respectively, against the JVM. Running on the JVM allows direct, same process calls between PHP, Java and Groovy code allowing applications to be assembled using a variety of languages.

In contrast to the approach taken by Quercus, the other JVM based PHP implementation, sMash is able to re-use existing PHP extensions from PHP.net attaching them to the Java virtual machine via the Java Native Interface (JNI) and an API layer called XAPI-C.

The runtime has a DBGp debug port allowing debug access from IDEs and debuggers which support the DBGp protocol such as the Eclipse PDT project.

The PHP runtime does not have an identity outside of sMash so it is simply referred to as the "WebSphere sMash runtime for PHP."

As of October 2008 WebSphere sMash is capable of running several well-known PHP applications on a Java Virtual Machine. These include SugarCRM, phpBB, WordPress and Mediawiki.

The PHP runtime supports close integration with the Java and Groovy languages through its Java/Groovy bridge. This allows PHP scripts to use libraries written in Java and Groovy through a lightweight and extremely fast interop layer. The Groovy bridge allows advanced features from Groovy to be accessed directly from PHP. Examples include closures and Groovy metaobjects.

Read more about this topic:  Project Zero

Famous quotes containing the word support:

    But look what we have built ... low-income projects that become worse centers of delinquency, vandalism and general social hopelessness than the slums they were supposed to replace.... Cultural centers that are unable to support a good bookstore. Civic centers that are avoided by everyone but bums.... Promenades that go from no place to nowhere and have no promenaders. Expressways that eviscerate great cities. This is not the rebuilding of cities. This is the sacking of cities.
    Jane Jacobs (b. 1916)