Functions that are wrappers or custom implementations of PHP functions.
Certain PHP functions should not be used in Drupal. Instead, Drupal's replacement functions should be used.
For example, for improved or more secure UTF8-handling, or RFC-compliant handling of URLs in Drupal.
For ease of use and memorizing, all these wrapper functions use the same name as the original PHP function, but prefixed with "drupal_". Beware, however, that not all wrapper functions support the same arguments as the original functions.
You should always use these wrapper functions in your code.
$my_substring = substr($original_string, 0, 5);
$my_substring = drupal_substr($original_string, 0, 5);
||Gets the filename from a given path.|
||Sets the permissions on a file or directory.|
||Gets the name of the directory from a given path.|
||Parses an array into a valid, rawurlencoded query string.|
||Converts an HTML-safe JSON string into its PHP equivalent.|
||Creates a directory using Drupal's default mode.|
||Moves an uploaded file to a new location.|
||Parses a system URL string into an associative array suitable for url().|
||Resolves the absolute filepath of a local URI or filepath.|
||Registers a function for execution on shutdown.|
||Removes a directory.|
||Called when an anonymous user becomes authenticated or vice-versa.|
||Starts a session forcefully, preserving already set session data.|
||Attempts to set the PHP maximum execution time.|
||Counts the number of characters in a UTF-8 string.|
||Lowercase a UTF-8 string.|
||Uppercase a UTF-8 string.|
||Cuts off a piece of a string based on character indices and counts.|
||Creates a file with a unique filename in the specified directory.|
||Capitalizes the first letter of a UTF-8 string.|
||Deletes a file.|
||Prepares a new XML parser.|
||Evaluates a string of PHP code.|