original_string: public static function function_call($function, array $arguments = null, $delay=0) {
          if ($arguments) {
              $arguments = array_map('json_encode', convert_to_array($arguments));
              $arguments = implode(', ', $arguments);
          } else {
              $arguments = '';
          }
          $js = "$function($arguments);";
  
          if ($delay) {
              $delay = $delay * 1000; // in miliseconds
              $js = "setTimeout(function() { $js }, $delay);";
          }
          return $js . "\n";
      }
code: public static function function_call($function, array $arguments = null, $delay=0) {
          if ($arguments) {
              $arguments = array_map('json_encode', convert_to_array($arguments));
              $arguments = implode(', ', $arguments);
          } else {
              $arguments = '';
          }
          $js = "$function($arguments);";
  
          if ($delay) {
              $delay = $delay * 1000; // in miliseconds
              $js = "setTimeout(function() { $js }, $delay);";
          }
          return $js . "\n";
      }
code_tokens: public static function function_call ( $ function , array $ arguments = null , $ delay = 0 ) { if ( $ arguments ) { $ arguments = array_map ( 'json_encode' , convert_to_array ( $ arguments ) ) ; $ arguments = implode ( ', ' , $ arguments ) ; } else { $ arguments = '' ; } $ js = "$function($arguments);" ; if ( $ delay ) { $ delay = $ delay * 1000 ; // in miliseconds $ js = "setTimeout(function() { $js }, $delay);" ; } return $ js . "\n" ; }
docstring: Returns javascript code calling the function
  
  @param string $function function name, can be complex like Y.Event.purgeElement
  @param array $arguments parameters
  @param int $delay execution delay in seconds
  @return string JS code fragment
docstring_tokens: Returns javascript code calling the function