webCOMAND

cScript Functions

All cTemplate Directives are available in cScript as functions, with the following additions and differences:

  • debug_echo()
  • exists()
  • eval()
  • gettype()
  • implode()
  • max()
  • min()
  • php($eval_string) - Evaluate string as PHP code and return result.
  • php_export($expression) - Call's PHP var_export($expression, TRUE).
  • regex_match($pattern,$subject) - Call PHP preg_match() and return if there was a match (TRUE or FALSE).
  • regex_replace($pattern,$replacment,$subject) - Call PHP preg_replace().
  • regex_select($pattern,$subject,$index=NULL) - Call PHP preg_match() and return the array of matches (if index=NULL) or a specific match (if index=n).
  • strlen() / length()
  • strtolower() / lc()
  • strtoupper() / uc()
  • strpos() / index()
  • strrpos() / rindex()
  • variable_scope()