ikirankumar
ikirankumar

Reputation: 115

For Drupal modules, is PHP the only language used?

For Drupal modules, is PHP the only language used? Or is it possible to create Drupal Modules in other languages?

Upvotes: 0

Views: 896

Answers (1)

Pierre Buyle
Pierre Buyle

Reputation: 4873

Drupal is a PHP application and there is no bridge, neither in PHP or specifically for Drupal, to allow easy development of module using other languages.

But since a Drupal module is essentially a collection of functions whose names follow a known convention, it should be possible to write module in language that can be compiled to PHP or that could be exposed as PHP functions by the used PHP runtime. Unfortunately there is not many language that can be compiled to PHP. A quick Googling returns Snow. Because a PHP extension expose PHP functions, C should be usable to write a module's functions. It might also be possible to use the Quercus PHP engine (100% Java implementation of PHP 5) to allow module to be written in Java. In all cases, these options are likely highly experimental and not worth the trouble for real world usage (except maybe Quercus for usage in large Java-driven organizations).

Upvotes: 2

Related Questions