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:

    Many people now believe that if fathers are more involved in raising children than they were, children and sons in particular will learn that men can be warm and supportive of others as well as be high achievers. Thus, fathers’ involvement may be beneficial not because it will help support traditional male roles, but because it will help break them down.
    Joseph H. Pleck (20th century)