CodefyPHP contains several global helper functions. Some of them are used throughout the framework and are available for use at any point.
Check whether variable is an Error instance.
Escapes html.
Escapes a translated string to make it safe for HTML output.
Escapes for textarea.
Escapes a url.
Escaping for html attributes.
Escapes a translated string to make it safe for HTML attribute.
Escaping for inline javascript.
Makes content safe to print on screen. This function should only be used on output.
Converts a multi-dimensional array into a regular array.
Trims all whitespace.
Properly strip all HTML tags including script and style (default).
Translates a string.
Wrapper function for the core PHP function: trigger_error.
Will remove trailing forward and backslashes if it exists already before adding a trailing forward slash. This prevents double slashing a string or path.
Removes trailing forward slashes and backslashes if they exist.
Concatenation with separator.
Checks if a variable is null. Works the same as PHP’s native is_null() function. If $var is not set, an Undefined variable notice will be...
Checks if return is true.
Checks if return is false.
Truncates a string to the given length. It will optionally preserve HTML tags if $isHtml is set to true.
Strips out all duplicate values and compact the array.
Takes an array and turns it into an object.
SQL Like operator for PHP.
SQL Where operator for PHP.
Sorts a structured array by Name property.
An alternative to using PHP's native mail function with other options for SMTP (default), Qmail, and Sendmail.