Version: v0.7.0 - Beta.  We welcome contributors & feedback.$phpClassName, $arg1, $arg2, ...) -> object


Instantiate a PHP class.

For convenience, you can use forward slashes in place of backslashes for namespace separators.

$obj ='vendorLibrary/SomeClass', 123)


The object will be returned in a wrapper object for compatibility with THT.

It contains some additional methods to help work around any inconsistencies, such as naming conventions that don’t work with THT.

$className = 'vendorLibrary/SomeClass'
Php.require($className ~ '.php')

$obj =$className)

$obj.zGet('SOME_CONSTANT')  //= e.g. 123

See Also