Version: v0.5.0 - Beta.  We welcome contributors & feedback.  THanks!

PHP Interface

Overview 

THT has basic support for calling PHP libraries via the Php module.

PHP Files 

Accessible PHP files should be located in app/misc/php.

They can be executed via Php.require, which uses PHP's require_once function.

Php.require('myPhpLibrary.php');

// Call a global function
let val = Php.call('a_php_function', 'arg1', 'arg2');

// Create an object
// Namespaces can use '/' instead of '\'
let obj = Php.new('Abc/MyClass');

obj.someMethod();

See Also