PHP code example of crodas / function-discovery

1. Go to this page and download the library: Download crodas/function-discovery library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crodas / function-discovery example snippets




/** @API my_name */
function foobar(Array $args) {
  return $args[0];
}

$apis = new FunctionDiscovery(__DIR__);
$functions = $apis->getFunctions('@api');
echo $functions['my_name']($arg1, $arg2);