Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Php.functionExists

Php.functionExists($phpFunctionName) -> boolean

Description

Return true if the given PHP function has been defined.

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

if Php.functionExists('imap_open') {
    print('IMAP functions are available.')
}

$fnName = 'vendorLibrary/someFunction'
if Php.functionExists($fnName) {
    Php.call($fnName, 123)
}

See Also